public class DefaultFeatureReference extends Object implements FeatureReferenceProviderServices, Persistent
Constructor and Description |
---|
DefaultFeatureReference()
Constructor used by the persistence manager.
|
DefaultFeatureReference(DefaultFeature feature) |
DefaultFeatureReference(FeatureStore store) |
DefaultFeatureReference(FeatureStore store,
FeatureProvider fdata) |
DefaultFeatureReference(FeatureStore store,
Object oid) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Feature |
getFeature()
Returns the referenced
Feature |
Feature |
getFeature(FeatureType featureType)
Returns the referenced
Feature |
String |
getFeatureTypeId()
Return the identifier of the
FeatureType of the represented
feature |
String[] |
getKeyNames()
Return the attribute names that compound the Primary Key of represented
feature
|
Object |
getKeyValue(String name)
Return the value of an attribute that compound the Primary Key of
represented feature
|
Object |
getOID()
Return the OID (Object IDentifier) object that represents this reference
Note: this can be
null if provider does not
support OID |
int |
hashCode() |
boolean |
isNewFeature()
Inform that represented feature is not stored in the original data store
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
static void |
registerPersistent() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
String |
toString() |
public DefaultFeatureReference()
loadFromState(PersistentState)
to set
the values of the internal attributes that this class needs to work.public DefaultFeatureReference(DefaultFeature feature)
public DefaultFeatureReference(FeatureStore store, FeatureProvider fdata)
public DefaultFeatureReference(FeatureStore store)
public DefaultFeatureReference(FeatureStore store, Object oid)
public Feature getFeature() throws DataException
FeatureReference
Feature
getFeature
in interface FeatureReference
Feature
identified by this FeatureReference
DataException
public Feature getFeature(FeatureType featureType) throws DataException
FeatureReference
Feature
getFeature
in interface FeatureReference
featureType
- The FeatureType
to which the referenced
Feature
belongs.Feature
identified by this FeatureReference
DataException
public Object getOID()
FeatureReferenceProviderServices
null
if provider does not
support OIDgetOID
in interface FeatureReferenceProviderServices
Object
that identifies a featureFeatureStoreProvider.getOIDType()
,
FeatureType.hasOID()
public boolean isNewFeature()
FeatureReference
isNewFeature
in interface FeatureReference
public String[] getKeyNames()
FeatureReferenceProviderServices
getKeyNames
in interface FeatureReferenceProviderServices
FeatureReferenceProviderServices.getKeyValue(String)
public Object getKeyValue(String name)
FeatureReferenceProviderServices
getKeyValue
in interface FeatureReferenceProviderServices
FeatureReferenceProviderServices.getKeyNames()
public String getFeatureTypeId()
FeatureReferenceProviderServices
FeatureType
of the represented
featuregetFeatureTypeId
in interface FeatureReferenceProviderServices
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public static void registerPersistent()