com.metamatrix.common.object
Class PropertyType

java.lang.Object
  extended by com.metamatrix.common.object.PropertyType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public final class PropertyType
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

See Also:
Serialized Form

Field Summary
static PropertyType BOOLEAN
           
static PropertyType BYTE
           
static PropertyType DATA_TYPE
           
static PropertyType DATE
           
static PropertyType DESCRIPTOR
           
static PropertyType DOUBLE
           
static PropertyType FILE
           
static PropertyType FLOAT
           
static PropertyType HOSTNAME
           
static PropertyType INTEGER
           
static PropertyType LIST
           
static PropertyType LONG
           
static PropertyType MULTIPLICITY
           
static PropertyType OBJECT_ID
           
static PropertyType OBJECT_REFERENCE
           
static PropertyType PASSWORD
           
static PropertyType PROPERTIED_OBJECT
           
static PropertyType REG_EXPRESSION
           
static PropertyType SET
           
static PropertyType SHORT
           
static PropertyType STRING
           
static PropertyType TIME
           
static PropertyType TIMESTAMP
           
static PropertyType UNBOUNDED_INTEGER
           
static java.lang.String UNBOUNDED_INTEGER_KEYWORD
           
static PropertyType URI
           
static PropertyType URL
           
 
Method Summary
 int compareTo(java.lang.Object obj)
          Compares this object to another.
 boolean equals(java.lang.Object obj)
          Returns true if the specified object is semantically equal to this instance.
 java.lang.String getClassName()
          Return the name of the Java class that best represents this type.
 java.lang.String getDisplayName()
          Return the display name for this type.
static PropertyType getInstance(int value)
           
static PropertyType getInstance(java.lang.String displayName)
           
static PropertyType getInstanceByClassName(java.lang.String className)
           
 int hashCode()
          Returns the hash code value for this object.
 boolean isValidValue(java.lang.Object value)
           
 java.lang.String toString()
          Returns a string representing the current state of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

STRING

public static final PropertyType STRING

INTEGER

public static final PropertyType INTEGER

LONG

public static final PropertyType LONG

FLOAT

public static final PropertyType FLOAT

DOUBLE

public static final PropertyType DOUBLE

BYTE

public static final PropertyType BYTE

SHORT

public static final PropertyType SHORT

BOOLEAN

public static final PropertyType BOOLEAN

TIME

public static final PropertyType TIME

DATE

public static final PropertyType DATE

TIMESTAMP

public static final PropertyType TIMESTAMP

LIST

public static final PropertyType LIST

SET

public static final PropertyType SET

URL

public static final PropertyType URL

HOSTNAME

public static final PropertyType HOSTNAME

FILE

public static final PropertyType FILE

OBJECT_ID

public static final PropertyType OBJECT_ID

MULTIPLICITY

public static final PropertyType MULTIPLICITY

PASSWORD

public static final PropertyType PASSWORD

PROPERTIED_OBJECT

public static final PropertyType PROPERTIED_OBJECT

DESCRIPTOR

public static final PropertyType DESCRIPTOR

OBJECT_REFERENCE

public static final PropertyType OBJECT_REFERENCE

DATA_TYPE

public static final PropertyType DATA_TYPE

UNBOUNDED_INTEGER

public static final PropertyType UNBOUNDED_INTEGER

REG_EXPRESSION

public static final PropertyType REG_EXPRESSION

URI

public static final PropertyType URI

UNBOUNDED_INTEGER_KEYWORD

public static final java.lang.String UNBOUNDED_INTEGER_KEYWORD
See Also:
Constant Field Values
Method Detail

getInstance

public static PropertyType getInstance(int value)

getInstance

public static PropertyType getInstance(java.lang.String displayName)

getInstanceByClassName

public static PropertyType getInstanceByClassName(java.lang.String className)

getDisplayName

public java.lang.String getDisplayName()
Return the display name for this type.

Returns:
the display name

getClassName

public java.lang.String getClassName()
Return the name of the Java class that best represents this type.

Returns:
the Java class that best represents this type.

compareTo

public int compareTo(java.lang.Object obj)
Compares this object to another. If the specified object is an instance of the MetaMatrixSessionID class, then this method compares the contents; otherwise, it throws a ClassCastException (as instances are comparable only to instances of the same class).

Note: this method is consistent with equals(), meaning that (compare(x, y)==0) == (x.equals(y)).

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - the object that this instance is to be compared to.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object, respectively.
Throws:
java.lang.IllegalArgumentException - if the specified object reference is null
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this instance.

equals

public boolean equals(java.lang.Object obj)
Returns true if the specified object is semantically equal to this instance. Note: this method is consistent with compareTo().

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object that this instance is to be compared to.
Returns:
whether the object is equal to this object.

hashCode

public final int hashCode()
Returns the hash code value for this object.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.

toString

public final java.lang.String toString()
Returns a string representing the current state of the object.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this instance.

isValidValue

public boolean isValidValue(java.lang.Object value)


Copyright © 2009. All Rights Reserved.