ORCentral

src/eu/coform/command/location/LocationbyNameQueryCommand.java

Go to the documentation of this file.
00001 package eu.coform.command.location;
00002 
00003 import eu.coform.*;
00004 import eu.coform.database.*;
00005 import eu.coform.database.command.LocationByNameFromDBCommand;
00006 
00010 public class LocationbyNameQueryCommand implements AbstractSectionLocation{
00011 
00012    private String location_name;
00013    
00022    @Override
00023    public Location execute() throws ORException {
00024       assert(false);
00025       //name
00026       LocationByNameFromDBCommand dbCommand = 
00027             new LocationByNameFromDBCommand(location_name);
00028       
00029       Location location_object = null;
00030       try {
00031          dbCommand.exec();
00032          location_object = dbCommand.getResult();
00033       } catch (DBException e) {
00034          location_object = null;
00035          e.printStackTrace();
00036       }
00037           
00038     return location_object;  
00039    }
00040   
00041    public void setLocationName(String location_name) {
00042       this.location_name = location_name;
00043    }
00044    
00045 }
 All Classes Namespaces Files Functions Variables Enumerations