Expresso 5-6

com.jcorporate.expresso.core.dataobjects
Interface Defineable

All Known Implementing Classes:
JoinedDataObject

public interface Defineable

Interface for providing auto-definition of DataObjects. Many DataObjects needs something other than just classname to differentiate themselves. For example, AutoDBObject needs to know the table name to automatically initialize to. JoinedDataObject needs a location of the xml definition file. Classes that implement the Defineable interface should get their setDefinitionName() called before the object is actually used in any manner.

Author:
Michael Rimov

Method Summary
 String getDefinitionName()
          Retrieve the key to the definition name for the given DBObject.
 void setDefinitionName(String definitionName)
          Use this method to set the key to the definition name for the Defineable database object.
 

Method Detail

setDefinitionName

public void setDefinitionName(String definitionName)
                       throws DataException
Use this method to set the key to the definition name for the Defineable database object. The actual meaning of the definitionName may be different. For example, AutoDBObject's definition name is the database table name. JoinedDataObject's definition name is the classpath URL location to the definition XML file.

Parameters:
definitionName - java.lang.String, the actual definition of the dataobject.
Throws:
DataException - if the DataObject is unable to initialize itself with the given definition name.

getDefinitionName

public String getDefinitionName()
Retrieve the key to the definition name for the given DBObject.

Returns:
the definition name.

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.