public class RoleObject extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
RoleObject.AssociationAccess
Class used to access a relation.
|
| Modifier and Type | Field and Description |
|---|---|
protected static int |
MAX_RELATION_TYPE
The maximum constant value for a relation type
|
protected static int |
MIN_RELATION_TYPE
The minimum constant value for a relation type
|
static int |
MORE_RELATED
Constant denoting a many-relation
|
static int |
ONE_IN_MORE_RELATED
Constant denoting a one - in - many relation (e.g.
|
static int |
ONE_RELATED
Constant denoting a one-relation
|
static int |
PARENT_RELATION
Constant denoting a parent-association
|
| Constructor and Description |
|---|
RoleObject(String roleName)
Instanciates a new RoleObject with the specified role name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAssociation(Object associationRoleObject,
String associationName,
int associationType,
boolean useAccessMethod,
Class paramType)
Adds an association to the list of associated objects.
|
void |
addListBlock(Object listBlock,
Class[] params)
Adds a list block.
|
void |
addSimpleBlock(Object simpleBlock)
Adds a simple block to the list of simple blocks that can display the
domain object.
|
boolean |
equals(Object obj)
Two role objects are considered equal if they have the same role name.
|
RoleObject.AssociationAccess |
getAssociationAccess(RoleObject associationRole)
Gets the associationAcces instance used for accessing the associations on
the specified role object
|
Iterator |
getAssociationRoles()
Returns an iterator with the AssociationAccess instances of this role
|
Set |
getAssociations(Object actualObject)
Returns a Set of Sets with all relations.
|
List |
getListBlockArgs(Object domainObject,
Class[] params)
Internal use.
|
void |
getListBlockArgs(Object actualObject,
RoleObject roleObject,
Listblock aListBlock,
Class[] params,
Object[] args,
int curIndex)
Internal use Gets a list of arguments used in reflection to access a
listblock.
|
Class[] |
getListBlockParams(Object aListBlock)
Gets the set of arguments for a list block
|
Map |
getListBlocks()
Returns a list of list blocks that displays the domain object
|
AbstractNode |
getNode()
Internal use! Gets the abstract node associated with this role object.
|
Object |
getParentDomainObject(Object childObject)
Returns the parent domain instanceo of the specified child instance
|
List |
getPathToRole(String targetRoleName)
Gets the path to from this role object to the specified role object, and
returns a
List where each sucessive entry represents a node
on the path to the target. |
String |
getRoleName()
Returns the role name of this role
|
List |
getSimpleBlocks()
Gets the list of simple blocks that can display the domain object
|
int |
hashCode() |
boolean |
hasLoopInAssociations()
Detects if there is associative loop
|
boolean |
isUpRelated()
Returns
true if this role is up-related. |
void |
setNode(AbstractNode node)
Internal use! Sets the abstract node associated with this role object.
|
void |
setUpRelated(boolean isUpRelated)
Sets the up-related property.
|
protected static final int MIN_RELATION_TYPE
protected static final int MAX_RELATION_TYPE
public static final int ONE_RELATED
public static final int ONE_IN_MORE_RELATED
public static final int MORE_RELATED
public static final int PARENT_RELATION
public RoleObject(String roleName)
roleName - the roleName representet by this role object.public void setNode(AbstractNode node)
node - (missing javadoc)public AbstractNode getNode()
public void addAssociation(Object associationRoleObject, String associationName, int associationType, boolean useAccessMethod, Class paramType)
associationRoleObject - The g9 specified role nameassociationName - The name of the association in the domain modelassociationType - the type of associationuseAccessMethod - if true, the getter and setter is used to access
the associationparamType - the param type of the association.public Object getParentDomainObject(Object childObject)
childObject - the child instancepublic boolean hasLoopInAssociations()
true if there is looppublic List getPathToRole(String targetRoleName)
List where each sucessive entry represents a node
on the path to the target. E.g: if the path to 'C', is A -> B -> C, and
this node is 'A', the returned list contains the elements {A, B, C}, in
that order. If no path exists, null is returned.targetRoleName - the name of the target nodepublic Set getAssociations(Object actualObject)
actualObject - (missing javadoc)public String getRoleName()
public RoleObject.AssociationAccess getAssociationAccess(RoleObject associationRole)
associationRole - the association rolepublic Iterator getAssociationRoles()
public void addListBlock(Object listBlock, Class[] params)
listBlock - the list blockparams - the parameters excepcted by the listblock linepublic Map getListBlocks()
public void addSimpleBlock(Object simpleBlock)
simpleBlock - the simple blockpublic List getSimpleBlocks()
public boolean equals(Object obj)
public Class[] getListBlockParams(Object aListBlock)
aListBlock - (missing javadoc)public List getListBlockArgs(Object domainObject, Class[] params)
domainObject - the domain objectparams - array of parameterspublic void getListBlockArgs(Object actualObject, RoleObject roleObject, Listblock aListBlock, Class[] params, Object[] args, int curIndex)
actualObject - the actual objectroleObject - the role objectaListBlock - a list blockparams - the parameter arrayargs - the argument arraycurIndex - the index of the current argumentpublic boolean isUpRelated()
true if this role is up-related.true if this role is up-related.public void setUpRelated(boolean isUpRelated)
isUpRelated - the value of the property.Copyright © 2006–2017 Esito AS. All rights reserved.