gov.usda.gdpc
Interface DBElement

All Superinterfaces:
java.lang.Comparable, java.util.Map
All Known Implementing Classes:
AbstractDBElement

public interface DBElement
extends java.lang.Comparable, java.util.Map

Element that came from a database.

Author:
terryc

Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Method Summary
 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.
 java.lang.String getType()
          Get type of this element.
 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.
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

getProperty

public java.lang.Object getProperty(Property property)
Returns the value of the specified property.

Parameters:
property - property to retrieve
Returns:
property value. null if not defined.

properties

public java.util.List properties()
Return list of properties defined for this database element.

Returns:
list of properties

getName

public java.lang.String getName()
Returns the name of this database element.

Returns:
the name

getDataSource

public java.lang.String getDataSource()
Returns the data source of this element.

Returns:
data source

getID

public Identifier getID()
Returns identifier of this element.

Returns:
identifier

propsEqual

public boolean propsEqual(java.util.Map properties)
Returns whether given properties exactly match properties of this instance.

Parameters:
properties - properties to match.
Returns:
true if given properties exactly match this instance's properties.

numProperties

public int numProperties()
Returns the number of properties defined for this element.

Returns:
number of properties

getKey

public java.lang.String getKey()
Get the unique key for the element.

Returns:
key

getType

public java.lang.String getType()
Get type of this element.

Returns:
type