SRJRCFrames
v0.1.296

de.schwarzrot.data.support
Class AbstractEntityReference<A extends Entity,B extends Entity>

java.lang.Object
  extended by com.jgoodies.binding.beans.Model
      extended by de.schwarzrot.data.support.AbstractEntity
          extended by de.schwarzrot.data.support.AbstractEntityReference<A,B>
Type Parameters:
A - the master Entity
B - the related Entity
All Implemented Interfaces:
com.jgoodies.binding.beans.Observable, Entity, EntityReference<A,B>, Serializable, Comparable<Entity>
Direct Known Subclasses:
AbstractWeightedEntityReference

public abstract class AbstractEntityReference<A extends Entity,B extends Entity>
extends AbstractEntity
implements EntityReference<A,B>

implements a base class for anonymous references between different Entity. The referenceA is silently considered the master and referenceB is silently considered the related target.

Author:
Reinhard Mantey
See Also:
Serialized Form

Constructor Summary
AbstractEntityReference(A refA, B refB)
           
 
Method Summary
 A getReferenceA()
           
 B getReferenceB()
           
 List<String> getUniqColumnNames()
          returns a list of property names, which serve to detect a uniq instance without the usage of the primary key.
 void setReferenceA(A referenceA)
           
 void setReferenceB(B referenceB)
           
 
Methods inherited from class de.schwarzrot.data.support.AbstractEntity
adoptChildren, adoptChildren, adoptGroupedChildren, compareTo, equals, getCModified, getCode, getDefaultOrder, getDtCreated, getDtModified, getId, getLogger, getMappings, getPersistenceName, getSchemaName, getSkipList, getSystemClass, getUCreated, getUModified, getUserAttributes, getVariantColumnName, getVariantTypeMap, hashCode, isDirty, isUserType, isVirtual, setCModified, setDirty, setDtCreated, setDtModified, setId, setSchemaName, setUCreated, setUModified, toString, validate
 
Methods inherited from class com.jgoodies.binding.beans.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.schwarzrot.data.EntityReference
getAType, getBType
 
Methods inherited from interface com.jgoodies.binding.beans.Observable
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

AbstractEntityReference

public AbstractEntityReference(A refA,
                               B refB)
Method Detail

getReferenceA

public final A getReferenceA()
Specified by:
getReferenceA in interface EntityReference<A extends Entity,B extends Entity>

getReferenceB

public final B getReferenceB()
Specified by:
getReferenceB in interface EntityReference<A extends Entity,B extends Entity>

getUniqColumnNames

public List<String> getUniqColumnNames()
Description copied from interface: Entity
returns a list of property names, which serve to detect a uniq instance without the usage of the primary key. In database context this list is used to decide, whether a save operation needs an update or an insert.

Specified by:
getUniqColumnNames in interface Entity
Overrides:
getUniqColumnNames in class AbstractEntity
Returns:
a list of property names

setReferenceA

public final void setReferenceA(A referenceA)
Specified by:
setReferenceA in interface EntityReference<A extends Entity,B extends Entity>

setReferenceB

public final void setReferenceB(B referenceB)
Specified by:
setReferenceB in interface EntityReference<A extends Entity,B extends Entity>

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.