ORCentral

src/eu/coform/command/QueryUniqueIDCommand.java

Go to the documentation of this file.
00001 package eu.coform.command;
00002 
00003 import eu.coform.ORException;
00004 import eu.coform.UniqueID;
00005 import eu.coform.command.proto.Abstract;
00006 import eu.coform.database.DBException;
00007 import eu.coform.database.command.UniqueIDFromDBCommand;
00008 
00012 public class QueryUniqueIDCommand implements Abstract {
00013 
00014    private String id;
00015 
00023    @Override
00024    public UniqueID execute() throws ORException {
00025      
00026       UniqueIDFromDBCommand idDBCommand = new UniqueIDFromDBCommand(id);
00027       
00028       try {
00029          idDBCommand.exec();
00030          return idDBCommand.getResult();
00031       } catch (DBException e) {
00032          // TODO Auto-generated catch block
00033          e.printStackTrace();
00034          return null;
00035       }
00036    }
00037 
00042    public void setId(String id) {
00043       this.id = id;
00044    }
00045 
00050    public String getId() {
00051       return id;
00052    }
00053 
00054 }
 All Classes Namespaces Files Functions Variables Enumerations