/** Determines whether this field element is read only or not. * @return <code>true</code> if the field is read only, * <code>false</code> otherwise */ public boolean isReadOnly () { return getProperty(READ_ONLY); }
/** Returns true if the version number of this MappingClassElement object * is older than the current version number of the archiving scheme. * @see #getVersionNumber * @return true if it is in need of updating, false otherwise */ public boolean hasOldVersionNumber () { return (getVersionNumber() < CURRENT_VERSION_NO); }
final RelationshipElement getRelationshipElement () { return ((MappingClassElementImpl)getDeclaringClass()). getPersistenceElement().getRelationship(getName()); }
/** Set the column pairs for this holder. * Previous column pairs are removed. * @param pairs the new column pairs * @throws ModelException if impossible */ public void setColumnPairs (ColumnPairElement[] pairs) throws ModelException { removeColumnPairs(getColumnPairNames()); // remove the old ones addColumnPairs(pairs); // add the new ones }
/** Overrides MappingElementImpl's <code>hashCode</code> method to add * the hashCode of this mapping element's declaring class. * @return a hash code value for this object. */ public int hashCode () { MappingClassElement declaringClass = getDeclaringClass(); return (super.hashCode() + ((declaringClass == null) ? 0 : declaringClass.hashCode())); }
public void setReferentialIntegrityUpdates (boolean flag) { setProperty(flag, REF_INTEGRITY_UPDATES); }
/** This method is called prior to storing a MappingClassElement in a * .mapping file. This method provides a hook to do any conversion * before archiving. * Note, the signature of preArchive in the interface MappingClassElement * includes a throws clause (ModelException), but the actual implementation * does not throw an exception. */ public void preArchive () { // update version number setVersionNumber(CURRENT_VERSION_NO); }
/** Remove a column pair from the holder. * @param pair the column pair to remove * @throws ModelException if impossible */ public void removeColumnPair (ColumnPairElement pair) throws ModelException { removeColumnPairs(new ColumnPairElement[]{pair}); }
/** Overrides Object's <code>toString</code> method to return the name * of this mapping element. * @return a string representation of the object */ public String toString () { return getName(); }
/** Create new MappingFieldElementImpl with the corresponding name and * declaring class. * @param name the name of the element * @param declaringClass the class to attach to */ public MappingFieldElementImpl (String name, MappingClassElement declaringClass) { super(name, declaringClass); setFetchGroupInternal(GROUP_DEFAULT); }
/** Create new MappingRelationshipElementImpl with the corresponding name * and declaring class. * @param name the name of the element * @param declaringClass the class to attach to */ public MappingRelationshipElementImpl (String name, MappingClassElement declaringClass) { super(name, declaringClass); setFetchGroupInternal(GROUP_NONE); }
/** Determines whether this field element is read only or not. * @return <code>true</code> if the field is read only, * <code>false</code> otherwise */ public boolean isReadOnly () { return getProperty(READ_ONLY); }
public void setObserveOnAccess (boolean flag) { setProperty(flag, OBSERVE_ON_ACCESS); }
/** Returns true if the version number of this MappingClassElement object * is older than the current version number of the archiving scheme. * @see #getVersionNumber * @return true if it is in need of updating, false otherwise */ public boolean hasOldVersionNumber () { return (getVersionNumber() < CURRENT_VERSION_NO); }
/** This method is called prior to storing a MappingClassElement in a * .mapping file. This method provides a hook to do any conversion * before archiving. * Note, the signature of preArchive in the interface MappingClassElement * includes a throws clause (ModelException), but the actual implementation * does not throw an exception. */ public void preArchive () { // update version number setVersionNumber(CURRENT_VERSION_NO); }
public boolean getObserveOnAccess () { return getProperty(OBSERVE_ON_ACCESS); }
public void setRecordOnUpdate (boolean flag) { setProperty(flag, RECORD_ON_UPDATE); }
public boolean getRecordOnUpdate () { return getProperty(RECORD_ON_UPDATE); }