Package org.apache.ofbiz.entity.model
Class ModelRelation
java.lang.Object
org.apache.ofbiz.entity.model.ModelChild
org.apache.ofbiz.entity.model.ModelRelation
- All Implemented Interfaces:
Serializable
An object that models the
<relation>
element.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ModelRelation
create
(ModelEntity modelEntity, String description, String type, String title, String relEntityName, String fkName, List<ModelKeyMap> keyMaps, boolean isAutoRelation) Returns a newModelRelation
instance, initialized with the specified values.static ModelRelation
create
(ModelEntity modelEntity, DatabaseUtil.ReferenceCheckInfo refInfo, boolean isAutoRelation) static ModelRelation
create
(ModelEntity modelEntity, Element relationElement, boolean isAutoRelation) Returns a newModelRelation
instance, initialized with the specified values.boolean
findKeyMap
(String fieldName) Find a KeyMap with the specified fieldNamefindKeyMapByRelated
(String relFieldName) Find a KeyMap with the specified relFieldNameReturns the combined name (title + related entity name).Returns the foreign key name.Returns the key maps.Returns the related entity name.getTitle()
Returns the title.getType()
Returns the type.int
hashCode()
boolean
Returnstrue
if this relation was generated automatically by the entity engine.keyMapRelatedUpperString
(String separator, String afterLast) keyMapString
(String separator, String afterLast) keyMapUpperString
(String separator, String afterLast) toString()
toXmlElement
(Document document) Methods inherited from class org.apache.ofbiz.entity.model.ModelChild
getDescription, getModelEntity
-
Method Details
-
create
public static ModelRelation create(ModelEntity modelEntity, String description, String type, String title, String relEntityName, String fkName, List<ModelKeyMap> keyMaps, boolean isAutoRelation) Returns a newModelRelation
instance, initialized with the specified values.- Parameters:
modelEntity
- TheModelEntity
this relation is a member of.description
- The relation description.type
- The relation type.title
- The relation title.relEntityName
- The related entity's name.fkName
- The foreign key name.keyMaps
- The key maps included in this relation.isAutoRelation
-true
if this relation was generated automatically by the entity engine.
-
create
public static ModelRelation create(ModelEntity modelEntity, Element relationElement, boolean isAutoRelation) Returns a newModelRelation
instance, initialized with the specified values.- Parameters:
modelEntity
- TheModelEntity
this relation is a member of.relationElement
- The<relation>
element containing the values for this relation.isAutoRelation
-true
if this relation was generated automatically by the entity engine.
-
create
public static ModelRelation create(ModelEntity modelEntity, DatabaseUtil.ReferenceCheckInfo refInfo, boolean isAutoRelation) -
getCombinedName
Returns the combined name (title + related entity name). -
getTitle
Returns the title. -
getType
Returns the type. -
getRelEntityName
Returns the related entity name. -
getFkName
Returns the foreign key name. -
getKeyMaps
Returns the key maps. -
isAutoRelation
public boolean isAutoRelation()Returnstrue
if this relation was generated automatically by the entity engine. -
findKeyMap
Find a KeyMap with the specified fieldName -
findKeyMapByRelated
Find a KeyMap with the specified relFieldName -
equals
-
hashCode
public int hashCode() -
toString
-
keyMapString
-
keyMapUpperString
-
keyMapRelatedUpperString
-
toXmlElement
-