|
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 | +--com.objy.db.app.ManyToMany
Defines a many-to-many relationship on a class.
The class on which a many-to-many relationship is being defined must define a public static relationship method that returns a properly initialized instance of this class.
Functionality | |
Constructors |
ManyToMany(String, String, String, byte) ManyToMany(String, String, String, byte, byte, boolean, boolean, byte) |
Testing | isToMany() isOtherToMany() |
Fields inherited from class com.objy.db.app.Relationship |
COPY_COPY, COPY_DELETE, COPY_MOVE, INLINE_LONG, INLINE_NONE, INLINE_SHORT, PRIVATE, PROTECTED, PUBLIC, VERSION_COPY, VERSION_DELETE, VERSION_MOVE |
Constructor Summary | |
ManyToMany(String memberName,
String otherClassName,
String otherMemberName)
Deprecated. Replaced by ManyToMany(String, String, String, byte). |
|
ManyToMany(String memberName,
String otherClassName,
String otherMemberName,
byte inlineMode)
Constructs a bidirectional many-to-many relationship with the default version and copy semantics, no delete or lock propagation, and the specified inline mode. |
|
ManyToMany(String memberName,
String otherClassName,
String otherMemberName,
byte copyMode,
byte versionMode,
boolean deletePropagate,
boolean lockPropagate)
Deprecated. Replaced by ManyToMany(String, String, String, byte, byte, boolean, boolean, byte). |
|
ManyToMany(String memberName,
String otherClassName,
String otherMemberName,
byte copyMode,
byte versionMode,
boolean deletePropagate,
boolean lockPropagate,
byte inlineMode)
Constructs a bidirectional many-to-many relationship with the specified version and copy semantics, delete and lock propagation behavior, and inline mode. |
Method Summary | |
void |
assertValidMember(String className,
Class memberClass,
String memberName)
Reserved for internal use; you should not call this method. |
boolean |
isOtherToMany()
Tests whether the inverse of this relationship is a to-many relationship. |
boolean |
isToMany()
Tests whether this relationship is a to-many relationship. |
Methods inherited from class com.objy.db.app.Relationship |
assertOtherRelMatches, dumpRelInfo, getAccessControl, getAssocNum, getCopyMode, getDirection, getInlineMode, getMemberID, getMemberName, getOtherClass, getOtherMember, getVersionMode, isBidirectional, isDefined, isDeletePropagated, isInline, isLockPropagated, setAccessControl, setAssocNum, setDefined, setDirection, setMemberID, setMemberIDAndAssocNum |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ManyToMany(String memberName, String otherClassName, String otherMemberName, byte copyMode, byte versionMode, boolean deletePropagate, boolean lockPropagate)
public ManyToMany(String memberName, String otherClassName, String otherMemberName, byte copyMode, byte versionMode, boolean deletePropagate, boolean lockPropagate, byte inlineMode)
You should use this constructor only in the static method that creates and returns the relationship object corresponding to a relationship field of a persistent object.
memberName
- The name of the relationship field.otherClassName
- The package-qualified name of the related class.otherMemberName
- The name of the inverse relationship field in the
related class.copyMode
- Specifies what to do with this relationship when
an object is copied; one of the following constants defined in the Relationship
class:
versionMode
- Specifies what to do with this
relationship when a new version of an object is created;
one of the following constants defined in the
Relationship class:
deletePropagate
- True if delete operations should be propagated;
otherwise false.lockPropagate
- True if lock operations should be propagated;
otherwise false.inlineMode
- Specifies how to store this relationship; one of the following constants defined in the
Relationship class:
public ManyToMany(String memberName, String otherClassName, String otherMemberName)
public ManyToMany(String memberName, String otherClassName, String otherMemberName, byte inlineMode)
When you create a copy or a new version of an object with this relationship, the relationship will be deleted in the new copy or version and kept in the original.
You should use this constructor only in the static method that creates and returns the relationship object corresponding to a relationship field of a persistent object.
memberName
- The name of the relationship
field. otherClassName
- The package-qualified name of
the related class. otherMemberName
- The name of the relationship
field in the related class.inlineMode
- Specifies how to store this relationship; one of the following constants defined in the
Relationship class:
Method Detail |
public boolean isToMany()
All many-to-many relationships are to-many relationships, so this method always returns true.
isToMany
in class Relationship
public boolean isOtherToMany()
All many-to-many relationships are bidirectional and the inverse of a many-to-many relationship is always to-many, so this method always returns true.
isOtherToMany
in class Relationship
public void assertValidMember(String className, Class memberClass, String memberName)
assertValidMember
in class Relationship
|
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.