| 
 | SRJRCFrames v0.1.296 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jgoodies.binding.beans.Model
de.schwarzrot.data.support.AbstractEntity
de.schwarzrot.data.meta.support.AbstractMetaEntity<N>
de.schwarzrot.data.meta.support.AbstractMetaChildEntity<String,DatabaseModel>
de.schwarzrot.data.meta.SchemaDefinition
public class SchemaDefinition
| Field Summary | 
|---|
| Fields inherited from class de.schwarzrot.data.meta.support.AbstractMetaEntity | 
|---|
| MODEL_SCHEMA | 
| Fields inherited from interface de.schwarzrot.data.ChildEntity | 
|---|
| PARENT_ATTR_NAME | 
| Constructor Summary | |
|---|---|
| SchemaDefinition() | |
| Method Summary | |
|---|---|
|  void | fixImported(Converter cnv) | 
|  Map<String,String> | getMappings()returns a map with mappings of logical property names to physical property names (column names in database terms). | 
|  Class<DatabaseModel> | getParentType()returns the type of the parent entity | 
|  String | getPersistenceName()returns the name of the entity for persistance. | 
|  Map<String,TableDefinition> | getTables() | 
|  String | getTableSpace() | 
|  void | setTables(Map<String,TableDefinition> tables) | 
|  void | setTableSpace(String tableSpace) | 
|  String | toString() | 
|  void | validate(boolean read)will be called just before saving and after loading, so it is intended to give the opportunity to calculate virtual fields. | 
| Methods inherited from class de.schwarzrot.data.meta.support.AbstractMetaChildEntity | 
|---|
| compareTo, getParent, setDirty, setParent | 
| Methods inherited from class de.schwarzrot.data.meta.support.AbstractMetaEntity | 
|---|
| getComment, getLogicalName, getName, getPhysID, getSchemaName, getUniqColumnNames, setComment, setName, setPhysID | 
| Methods inherited from class de.schwarzrot.data.support.AbstractEntity | 
|---|
| adoptChildren, adoptChildren, adoptGroupedChildren, equals, getCModified, getCode, getDefaultOrder, getDtCreated, getDtModified, getId, getLogger, getSkipList, getSystemClass, getUCreated, getUModified, getUserAttributes, getVariantColumnName, getVariantTypeMap, hashCode, isDirty, isUserType, isVirtual, setCModified, setDtCreated, setDtModified, setId, setSchemaName, setUCreated, setUModified | 
| Methods inherited from class com.jgoodies.binding.beans.Model | 
|---|
| addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface de.schwarzrot.data.NamedEntity | 
|---|
| getName, setName | 
| Methods inherited from interface de.schwarzrot.data.Entity | 
|---|
| getCModified, getDefaultOrder, getDtCreated, getDtModified, getId, getSchemaName, getSkipList, getSystemClass, getUCreated, getUModified, getUniqColumnNames, getUserAttributes, getVariantColumnName, getVariantTypeMap, isDirty, isUserType, isVirtual, setCModified, setDtCreated, setDtModified, setId, setUCreated, setUModified | 
| Methods inherited from interface com.jgoodies.binding.beans.Observable | 
|---|
| addPropertyChangeListener, removePropertyChangeListener | 
| Constructor Detail | 
|---|
public SchemaDefinition()
| Method Detail | 
|---|
public void fixImported(Converter cnv)
public Map<String,String> getMappings()
EntityEvery implementation should respect the parents mappings. The following sample shows different mapping types:
 public Map<String, String> getMappings() {
     Map<String, String> mappings = super.getMappings();
     mappings.put("title", "name");
     mappings.put("streams", Stream.class.getName());
     mappings.put("pageDefinitions", "pageType|" + ThemeElement.class.getName());
     return mappings;
 }
 
 
 The mappings explained:
 List, known (named) children are hold in a Map.
 The mapped value is used as classname to create child instances.Map, that holds grouped
 children. Known children are hold by a Map, unknown children by a
 List, so "pageDefinitions" may contain elements of type
 Map, or List. pageType, a property of
 ThemeElement, is used to group the children. The word before the
 '|' is the property name used as key value for grouping and the type
 after '|' is used to create instances.
getMappings in interface EntitygetMappings in class AbstractMetaEntity<String>Map with property names as keys and column
         names as values.public Class<DatabaseModel> getParentType()
ChildEntity
public String getPersistenceName()
EntitygetClass().getSimpleName(), but some storage may
 have size limitations, or don't support case sensitive names, so this
 call is to deal with that kind of limitations.
getPersistenceName in interface EntitygetPersistenceName in class AbstractEntitypublic final Map<String,TableDefinition> getTables()
public final String getTableSpace()
public final void setTables(Map<String,TableDefinition> tables)
public final void setTableSpace(String tableSpace)
public String toString()
toString in class AbstractEntitypublic void validate(boolean read)
Entity
validate in interface Entityvalidate in class AbstractEntityread - signals whether calculation should be done for reading or for
            writing| 
 | SRJRCFrames v0.1.296 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||