Class SelectorDomainType
- java.lang.Object
-
- org.openbravo.base.model.domaintype.BaseDomainType
-
- org.openbravo.base.model.domaintype.BaseForeignKeyDomainType
-
- org.openbravo.userinterface.selector.model.domaintype.SelectorDomainType
-
- All Implemented Interfaces:
DomainType
,ForeignKeyDomainType
public class SelectorDomainType extends BaseForeignKeyDomainType
Implements the domain type for a selector.- Author:
- mtaal
-
-
Constructor Summary
Constructors Constructor Description SelectorDomainType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Class<?>>
getClasses()
This method should be implemented by DomainTypes which require the usage of certain non-standard entities in the initialize() method.Column
getForeignKeyColumn(String columnName)
The foreign key column to which a certain column refers.protected String
getReferedTableName(String columnName)
Needs to be implemented by subclass.void
initialize()
Method is empty in this class, subclasses should override and call super.initialize() (to allow future additional initialization in this class).-
Methods inherited from class org.openbravo.base.model.domaintype.BaseForeignKeyDomainType
checkIsValidValue, getReferedEntity
-
Methods inherited from class org.openbravo.base.model.domaintype.BaseDomainType
checkObjectIsValid, getModelProvider, getReference, setModelProvider, setReference
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openbravo.base.model.domaintype.DomainType
checkObjectIsValid, getModelProvider, getReference, setModelProvider, setReference
-
-
-
-
Method Detail
-
getClasses
public List<Class<?>> getClasses()
Description copied from class:BaseDomainType
This method should be implemented by DomainTypes which require the usage of certain non-standard entities in the initialize() method.- Overrides:
getClasses
in classBaseDomainType
- Returns:
- The returned list should contain the classes of the entities which need to be accessed
-
initialize
public void initialize()
Description copied from class:BaseDomainType
Method is empty in this class, subclasses should override and call super.initialize() (to allow future additional initialization in this class). Note: any subclass should clean-up and close database connections or hibernate sessions. If this is not done then the update.database task may hang when disabling foreign keys.- Specified by:
initialize
in interfaceDomainType
- Overrides:
initialize
in classBaseDomainType
-
getForeignKeyColumn
public Column getForeignKeyColumn(String columnName)
Description copied from interface:ForeignKeyDomainType
The foreign key column to which a certain column refers. Is only relevant if this reference is a foreign key.- Specified by:
getForeignKeyColumn
in interfaceForeignKeyDomainType
- Overrides:
getForeignKeyColumn
in classBaseForeignKeyDomainType
- Parameters:
columnName
- the refering foreign key column- Returns:
- the refered to column based on the table encoded in the table name of the passed column. This method also handles exceptional column names in a specific way.
-
getReferedTableName
protected String getReferedTableName(String columnName)
Description copied from class:BaseForeignKeyDomainType
Needs to be implemented by subclass. If the subclass can not return the tablename then it can return null. The tablename is used to check that valid object is set in properties with this domain type.- Overrides:
getReferedTableName
in classBaseForeignKeyDomainType
- Returns:
- the table name of the table name refered to by this domain type.
-
-