|
Objectivity for Java Reference | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objy.db.app.Relationship
Abstract superclass for classes that define relationships between objects.
API Summary |
Because this class is abstract, you never instantiate it; instead, you work with instances of its derived classes. You should not create your own subclasses of this class.
The class on which a relationship is being defined must define a public static relationship method that returns a properly initialized instance of the corresponding subclass of Relationship:
This provides the information necessary to define the relationship in the Objectivity/DB schema. The name of the static method should be formed by appending "_Relationship" to the method that is being defined. To define a relationship on a class, you must also a declare a non-static relationship field typed as either:
Constant Types | |
Copy modes Specify how the relationship is handled when a copy of the object is created. |
COPY_COPY COPY_DELETE COPY_MOVE |
Version modes Specify how the relationship is handled when a new version of the object is created. |
VERSION_COPY VERSION_DELETE VERSION_MOVE |
Access control modes Specify how the relationship may be accessed. |
PRIVATE PROTECTED PUBLIC |
Inline modes Specify how the relationship should be stored. |
INLINE_NONE INLINE_LONG INLINE_SHORT |
Functionality | |
Getting Information | getMemberName() getOtherClass() getOtherMember() getCopyMode() getVersionMode() getAccessControl() getInlineMode() |
Testing | isBidirectional() isDeletePropagated() isLockPropagated() isToMany() isOtherToMany() isInline() |
Setting Properties | setAccessControl(int) |
Field Summary | |
static byte |
COPY_COPY
Copy mode: Copy this relationship from an object to a copy of the object. |
static byte |
COPY_DELETE
Copy mode: Delete this relationship in the copy of an object and leave it in the original object. |
static byte |
COPY_MOVE
Copy mode: Move this relationship from an object to a copy of the object. |
static byte |
INLINE_LONG
Inline mode: Store the relationship as a long inline. |
static byte |
INLINE_NONE
Inline mode: Store the relationship non-inline. |
static byte |
INLINE_SHORT
Inline mode: Store the relationship as a short inline. |
static int |
PRIVATE
Access-control mode: Allow private access to the relationship. |
static int |
PROTECTED
Access-control mode: Allow protected access to the relationship. |
static int |
PUBLIC
Access-control mode: Allow public access to the relationship. |
static byte |
VERSION_COPY
Version mode: Copy this relationship from an object to a new version of the object. |
static byte |
VERSION_DELETE
Version mode: Delete this relationship in the new version of an object and leave it in the original object. |
static byte |
VERSION_MOVE
Version mode: Move this relationship from an object to a new version of the object. |
Method Summary | |
void |
assertOtherRelMatches(String className,
Relationship otherRel)
Reserved for internal use; you should not call this method. |
void |
assertValidMember(String className,
Class memberClass,
String actualMemberName)
Reserved for internal use; you should not call this method. |
void |
dumpRelInfo()
Reserved for internal use; you should not call this method. |
int |
getAccessControl()
Gets the access control for this relationship in the schema. |
long |
getAssocNum()
Reserved for internal use; you should not call this method. |
byte |
getCopyMode()
Gets the copy mode for this relationship. |
int |
getDirection()
Reserved for internal use; you should not call this method. |
byte |
getInlineMode()
Gets the mode in which this relationship is stored. |
long |
getMemberID()
Reserved for internal use; you should not call this method. |
String |
getMemberName()
Gets the name of the field defining this relationship. |
String |
getOtherClass()
Gets the name of the related class for this relationship. |
String |
getOtherMember()
Gets the name of the relationship field in the related class. |
byte |
getVersionMode()
Gets the version mode for this relationship. |
boolean |
isBidirectional()
Tests whether this relationship is bidirectional. |
boolean |
isDefined()
Reserved for internal use; you should not call this method. |
boolean |
isDeletePropagated()
Tests whether propagation of object deletion is enabled for this relationship. |
boolean |
isInline()
Tests whether the relationship is inline or not. |
boolean |
isLockPropagated()
Tests whether propagation of object locking is enabled for this relationship. |
abstract boolean |
isOtherToMany()
Tests whether the inverse of this relationship is a to-many relationship. |
abstract boolean |
isToMany()
Tests whether this relationship is a to-many relationship. |
void |
setAccessControl(int accessControl)
Sets the access control for this relationship in the schema. |
void |
setAssocNum(long assocNum)
Reserved for internal use; you should not call this method. |
void |
setDefined(boolean flag)
Reserved for internal use; you should not call this method. |
void |
setDirection(int _direction)
Reserved for internal use; you should not call this method. |
void |
setMemberID(long memberID)
Reserved for internal use; you should not call this method. |
void |
setMemberIDAndAssocNum(long memberID,
long assocNum)
Reserved for internal use; you should not call this method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final byte COPY_DELETE
public static final byte COPY_MOVE
public static final byte COPY_COPY
public static final byte VERSION_DELETE
Note: Versioning objects is not supported in this release. These constants are defined so that relationships can be defined to interoperate with other programming interfaces that do support the version operation.
public static final byte VERSION_MOVE
Note: Versioning objects is not supported in this release. These constants are defined so that relationships can be defined to interoperate with other programming interfaces that do support the version operation.
public static final byte VERSION_COPY
Note: Versioning objects is not supported in this release. These constants are defined so that relationships can be defined to interoperate with other programming interfaces that do support the version operation.
public static final int PUBLIC
public static final int PRIVATE
public static final int PROTECTED
public static final byte INLINE_NONE
public static final byte INLINE_LONG
public static final byte INLINE_SHORT
Method Detail |
public String getMemberName()
public String getOtherClass()
public boolean isBidirectional()
public String getOtherMember()
public byte getCopyMode()
public byte getVersionMode()
public boolean isDeletePropagated()
public boolean isLockPropagated()
public long getMemberID()
public long getAssocNum()
public int getAccessControl()
setAccessControl(int)
public void setAccessControl(int accessControl)
If this method is never called, the default access control in the schema is the access control of the static method that returns this relationship. For example, if this relationship is in the fleet field of a Vehicle object, its default access control is the access control of the Vehicle.fleet_Relationship static method.
accessControl
- The access control for this
relationship; one of the following constants defined in this class:
getAccessControl()
public byte getInlineMode()
setAccessControl(int)
,
isInline()
public boolean isInline()
public boolean isDefined()
public void setDefined(boolean flag)
public void setDirection(int _direction)
public int getDirection()
public void setMemberIDAndAssocNum(long memberID, long assocNum)
public void setAssocNum(long assocNum)
public void setMemberID(long memberID)
public abstract boolean isToMany()
This method is abstract, so it can only be called on a subclass of Relationship.
public abstract boolean isOtherToMany()
This method is abstract, so it can only be called on a subclass of Relationship.
public void assertValidMember(String className, Class memberClass, String actualMemberName)
public void assertOtherRelMatches(String className, Relationship otherRel)
public void dumpRelInfo()
|
Objectivity for Java Reference | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2000 Objectivity, Inc. All rights reserved.