|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.postgis.FeatureDiffImpl
public class FeatureDiffImpl
Represents the difference between two states of the same feature.
Field Summary | |
---|---|
static int |
DELETED
Feature existed in fromVersion, but has been deleted (change map is empty) |
static int |
INSERTED
Feature does not exists in fromVersion, has been created in the meantime (change map contains all attributes in this case) |
static int |
UPDATED
Feature exists in both versions, but has been modified |
Constructor Summary | |
---|---|
FeatureDiffImpl(org.opengis.feature.simple.SimpleFeature oldFeature,
org.opengis.feature.simple.SimpleFeature newFeature)
Creates a new feature difference for a modified feature |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.util.List |
getChangedAttributes()
Returns a read only list of modified attribute names if state is FeatureDiff.UPDATED , an empty
list otherwise |
org.opengis.feature.simple.SimpleFeature |
getFeature()
Returns the inserted feature, if the state is FeatureDiff.INSERTED , the new feature, if the
state is FeatureDiff.UPDATED , null otherwise |
java.lang.String |
getID()
The feature ID |
org.opengis.feature.simple.SimpleFeature |
getOldFeature()
Returns the old feature, if the state is FeatureDiff.UPDATED or FeatureDiff.DELETED , null otherwise |
int |
getState()
The type of difference, either:: FeatureDiff.UPDATED
FeatureDiff.INSERTED
FeatureDiff.DELETED
|
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int INSERTED
public static final int UPDATED
public static final int DELETED
Constructor Detail |
---|
public FeatureDiffImpl(org.opengis.feature.simple.SimpleFeature oldFeature, org.opengis.feature.simple.SimpleFeature newFeature)
ID
- oldFeature
- newFeature
- changes
- Method Detail |
---|
public java.util.List getChangedAttributes()
FeatureDiff
FeatureDiff.UPDATED
, an empty
list otherwise
getChangedAttributes
in interface FeatureDiff
public java.lang.String getID()
FeatureDiff
getID
in interface FeatureDiff
public int getState()
FeatureDiff
getState
in interface FeatureDiff
public org.opengis.feature.simple.SimpleFeature getFeature()
FeatureDiff
FeatureDiff.INSERTED
, the new feature, if the
state is FeatureDiff.UPDATED
, null otherwise
getFeature
in interface FeatureDiff
public org.opengis.feature.simple.SimpleFeature getOldFeature()
FeatureDiff
FeatureDiff.UPDATED
or FeatureDiff.DELETED
, null otherwise
getOldFeature
in interface FeatureDiff
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |