Package org.ofbiz.core.entity.model
Class ModelRelation
java.lang.Object
org.ofbiz.core.entity.model.ModelRelation
Generic Entity - Relation model class
- Since:
- 2.0
- Version:
- $Revision: 1.1 $
- Author:
- David E. Jones
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringthe name to use for a database foreign key, if appliesprotected List<ModelKeyMap>keyMaps defining how to lookup the relatedTable using columns from this tableprotected ModelEntitythe main entity of this relationprotected Stringthe name of the related entityprotected Stringthe title, gives a name/description to the relationprotected Stringthe type: either "one" or "many" or "one-nofk" -
Constructor Summary
ConstructorsConstructorDescriptionDefault ConstructorModelRelation(ModelEntity mainEntity, Element relationElement) XML Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddKeyMap(ModelKeyMap keyMap) findKeyMap(String fieldName) Find a KeyMap with the specified fieldNamefindKeyMapByRelated(String relFieldName) Find a KeyMap with the specified relFieldNamegetKeyMap(int index) keyMaps defining how to lookup the relatedTable using columns from this tableintthe main entity of this relationthe name of the related entitygetTitle()the title, gives a name/description to the relationgetType()the type: either "one" or "many" or "one-nofk"keyMapRelatedUpperString(String separator, String afterLast) keyMapString(String separator, String afterLast) keyMapUpperString(String separator, String afterLast) removeKeyMap(int index) voidvoidsetMainEntity(ModelEntity mainEntity) voidsetRelEntityName(String relEntityName) voidvoid
-
Field Details
-
title
the title, gives a name/description to the relation -
type
the type: either "one" or "many" or "one-nofk" -
relEntityName
the name of the related entity -
fkName
the name to use for a database foreign key, if applies -
keyMaps
keyMaps defining how to lookup the relatedTable using columns from this table -
mainEntity
the main entity of this relation
-
-
Constructor Details
-
ModelRelation
public ModelRelation()Default Constructor -
ModelRelation
XML Constructor
-
-
Method Details
-
getTitle
the title, gives a name/description to the relation -
setTitle
-
getType
the type: either "one" or "many" or "one-nofk" -
setType
-
getRelEntityName
the name of the related entity -
setRelEntityName
-
getFkName
-
setFkName
-
getMainEntity
the main entity of this relation -
setMainEntity
-
getKeyMapsIterator
keyMaps defining how to lookup the relatedTable using columns from this table -
getKeyMapsSize
public int getKeyMapsSize() -
getKeyMap
-
addKeyMap
-
removeKeyMap
-
findKeyMap
Find a KeyMap with the specified fieldName -
findKeyMapByRelated
Find a KeyMap with the specified relFieldName -
keyMapString
-
keyMapUpperString
-
keyMapRelatedUpperString
-