org.apache.cayenne.reflect
Class BaseArcProperty

java.lang.Object
  extended by org.apache.cayenne.reflect.BaseProperty
      extended by org.apache.cayenne.reflect.BaseArcProperty
All Implemented Interfaces:
ArcProperty, Property
Direct Known Subclasses:
BaseToManyProperty, BaseToOneProperty

public abstract class BaseArcProperty
extends BaseProperty
implements ArcProperty

A base implementation of the ArcProperty.

Since:
3.0

Field Summary
protected  String complimentaryReverseArcName
           
protected  ObjRelationship relationship
           
protected  ClassDescriptor targetDescriptor
           
 
Fields inherited from class org.apache.cayenne.reflect.BaseProperty
accessor, owner
 
Constructor Summary
BaseArcProperty(ClassDescriptor owner, ClassDescriptor targetDescriptor, Accessor accessor, String reverseName)
           
 
Method Summary
 ArcProperty getComplimentaryReverseArc()
          Returns a complimentary reverse ArcProperty or null if no reverse arc exists.
 ObjRelationship getRelationship()
          Returns a relationship associated with this arc.
 ClassDescriptor getTargetDescriptor()
          Returns a ClassDescriptor for the type of graph nodes pointed to by this arc property.
abstract  boolean isFault(Object source)
          Returns whether a target node connected to a given object is an unresolved fault.
protected  void setReverse(Object source, Object oldTarget, Object newTarget)
          A convenience method to set the reverse arc used by subclasses.
abstract  boolean visit(PropertyVisitor visitor)
          A visitor accept method.
 
Methods inherited from class org.apache.cayenne.reflect.BaseProperty
getName, injectValueHolder, readProperty, readPropertyDirectly, toString, writeProperty, writePropertyDirectly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.cayenne.reflect.ArcProperty
invalidate
 
Methods inherited from interface org.apache.cayenne.reflect.Property
getName, injectValueHolder, readProperty, readPropertyDirectly, writeProperty, writePropertyDirectly
 

Field Detail

complimentaryReverseArcName

protected String complimentaryReverseArcName

targetDescriptor

protected ClassDescriptor targetDescriptor

relationship

protected ObjRelationship relationship
Constructor Detail

BaseArcProperty

public BaseArcProperty(ClassDescriptor owner,
                       ClassDescriptor targetDescriptor,
                       Accessor accessor,
                       String reverseName)
Method Detail

visit

public abstract boolean visit(PropertyVisitor visitor)
Description copied from interface: Property
A visitor accept method.

Specified by:
visit in interface Property
Specified by:
visit in class BaseProperty
Returns:
a status returned by the corresponding callback method of the visitor. It serves as an indication of whether peer properties processing is still needed.

isFault

public abstract boolean isFault(Object source)
Description copied from interface: ArcProperty
Returns whether a target node connected to a given object is an unresolved fault.

Specified by:
isFault in interface ArcProperty
Parameters:
source - an object that is a source object of the relationship.

getRelationship

public ObjRelationship getRelationship()
Description copied from interface: ArcProperty
Returns a relationship associated with this arc.

Specified by:
getRelationship in interface ArcProperty

getComplimentaryReverseArc

public ArcProperty getComplimentaryReverseArc()
Description copied from interface: ArcProperty
Returns a complimentary reverse ArcProperty or null if no reverse arc exists.

Specified by:
getComplimentaryReverseArc in interface ArcProperty

getTargetDescriptor

public ClassDescriptor getTargetDescriptor()
Description copied from interface: ArcProperty
Returns a ClassDescriptor for the type of graph nodes pointed to by this arc property. Note that considering that a target object may be a subclass of the class handled by the descriptor, users of this method may need to call ClassDescriptor.getSubclassDescriptor(Class) before using the descriptor to access objects.

Specified by:
getTargetDescriptor in interface ArcProperty

setReverse

protected void setReverse(Object source,
                          Object oldTarget,
                          Object newTarget)
A convenience method to set the reverse arc used by subclasses.



Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.