|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectgov.usda.gdpc.AbstractDBElement
This class provides a skeletal implementation of the DBElement interface to minimize the effort required to implement this interface.
| Nested Class Summary |
| Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
| Field Summary | |
protected java.util.Map |
myProperties
Defined properties for this database element |
| Constructor Summary | |
AbstractDBElement(java.util.Map properties,
java.lang.String key)
AbstractDBElement constructor. |
|
AbstractDBElement(Property[] keys,
java.util.Map properties,
java.lang.String key)
|
|
| Method Summary | |
void |
clear()
This operation is not supported. |
int |
compareTo(java.lang.Object o)
Compares two database elements to determine there order based on the alphabetical order of the string returned by getName(). |
boolean |
containsKey(java.lang.Object key)
Returns true if this map contains a mapping for the specified key. |
boolean |
containsValue(java.lang.Object value)
Returns true if this map maps one or more keys to the specified value. |
java.util.Set |
entrySet()
Returns a read-only set view of the mappings contained in this map. |
boolean |
equals(java.lang.Object obj)
This determines if two database elements are equal. |
java.lang.Object |
get(java.lang.Object key)
Returns the value to which this map maps the specified key. |
java.lang.String |
getDataSource()
Returns the data source of this element. |
Identifier |
getID()
Returns identifier of this element. |
java.lang.String |
getKey()
Get the unique key for the element. |
java.lang.String |
getName()
Returns the name of this database element. |
java.lang.Object |
getProperty(Property property)
Returns the value of the specified property. |
boolean |
isEmpty()
Returns true if this map contains no key-value mappings. |
java.util.Set |
keySet()
Returns a read-only set view of the keys contained in this map. |
int |
numProperties()
Returns the number of properties defined for this element. |
java.util.List |
properties()
Return list of properties defined for this database element. |
boolean |
propsEqual(java.util.Map properties)
Returns whether given properties exactly match properties of this instance. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
This operation is not supported. |
void |
putAll(java.util.Map t)
This operation is not supported. |
java.lang.Object |
remove(java.lang.Object key)
This operation is not supported. |
int |
size()
Returns the number of key-value mappings in this map. |
java.lang.String |
toString()
Returns the string representation of this database element. |
java.util.Collection |
values()
Returns a read-only collection view of the values contained in this map. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface gov.usda.gdpc.DBElement |
getType |
| Methods inherited from interface java.util.Map |
hashCode |
| Field Detail |
protected final java.util.Map myProperties
| Constructor Detail |
public AbstractDBElement(java.util.Map properties,
java.lang.String key)
properties - properties of this database element. The keys are
the properties (type: Property) and the values are the
corresponding value. Properties can not have a value equal to
null. It is not allowed to have two keys that are the same.key - unique key
public AbstractDBElement(Property[] keys,
java.util.Map properties,
java.lang.String key)
| Method Detail |
public java.lang.Object getProperty(Property property)
getProperty in interface DBElementproperty - property to retrieve
public java.util.List properties()
properties in interface DBElementpublic java.lang.String getName()
getName in interface DBElementpublic java.lang.String getDataSource()
getDataSource in interface DBElementpublic Identifier getID()
getID in interface DBElementpublic java.lang.String toString()
public java.lang.String getKey()
getKey in interface DBElementpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - the object to be compared
java.lang.ClassCastException - if the specified object's type prevents it
from being compared to this Object.public int numProperties()
numProperties in interface DBElementpublic final boolean propsEqual(java.util.Map properties)
propsEqual in interface DBElementproperties - properties to match.
public final boolean equals(java.lang.Object obj)
equals in interface java.util.Mapobj - object to test
public void clear()
clear in interface java.util.Mapjava.lang.UnsupportedOperationException - this operation is not supported.public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Mapkey - key whose presence in this map is to be tested.
java.lang.ClassCastException - if the key is of an inappropriate type for
this map (optional).
java.lang.NullPointerException - if the key is null and this map
does not not permit null keys (optional).public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Mapvalue - value whose presence in this map is to be tested.
java.lang.ClassCastException - if the value is of an inappropriate type for
this map (optional).
java.lang.NullPointerException - if the value is null and this map
does not not permit null values (optional).public java.util.Set entrySet()
entrySet in interface java.util.Mappublic java.lang.Object get(java.lang.Object key)
More formally, if this map contains a mapping from a key k to a value v such that (key==null ? k==null : key.equals(k)), then this method returns v; otherwise it returns null. (There can be at most one such mapping.)
get in interface java.util.Mapkey - key whose associated value is to be returned.
java.lang.ClassCastException - if the key is of an inappropriate type for
this map (optional).
java.lang.NullPointerException - key is null and this map does not
not permit null keys (optional).containsKey(Object)public boolean isEmpty()
isEmpty in interface java.util.Mappublic java.util.Set keySet()
keySet in interface java.util.Map
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in interface java.util.Mapjava.lang.UnsupportedOperationException - this operation is not supported.public void putAll(java.util.Map t)
putAll in interface java.util.Mapjava.lang.UnsupportedOperationException - this operation is not supported.public java.lang.Object remove(java.lang.Object key)
remove in interface java.util.Mapjava.lang.UnsupportedOperationException - this operation is not supported.public int size()
size in interface java.util.Mappublic java.util.Collection values()
values in interface java.util.Map
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||