org.alfresco.repo.attributes
Class Attribute.Type

java.lang.Object
  extended by java.lang.Enum
      extended by org.alfresco.repo.attributes.Attribute.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
Enclosing interface:
Attribute

public static class Attribute.Type
extends java.lang.Enum
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static Attribute.Type BOOLEAN
           
static Attribute.Type BYTE
           
static Attribute.Type DOUBLE
           
static Attribute.Type FLOAT
           
static Attribute.Type INT
           
static Attribute.Type LIST
           
static Attribute.Type LONG
           
static Attribute.Type MAP
           
static Attribute.Type SERIALIZABLE
           
static Attribute.Type SHORT
           
static Attribute.Type STRING
           
 
Method Summary
abstract  AttributeImpl getAttributeImpl(Attribute from)
          Get a persistable implementation of the Attribute given an existing attribute.
abstract  AttributeValue getAttributeValue(Attribute from)
          Get the unpersisted attribute value implementation of the Attribute given an existing attribute.
static Attribute.Type valueOf(java.lang.String name)
           
static Attribute.Type[] values()
           
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BOOLEAN

public static final Attribute.Type BOOLEAN

BYTE

public static final Attribute.Type BYTE

SHORT

public static final Attribute.Type SHORT

INT

public static final Attribute.Type INT

LONG

public static final Attribute.Type LONG

FLOAT

public static final Attribute.Type FLOAT

DOUBLE

public static final Attribute.Type DOUBLE

STRING

public static final Attribute.Type STRING

SERIALIZABLE

public static final Attribute.Type SERIALIZABLE

MAP

public static final Attribute.Type MAP

LIST

public static final Attribute.Type LIST
Method Detail

values

public static final Attribute.Type[] values()

valueOf

public static Attribute.Type valueOf(java.lang.String name)

getAttributeValue

public abstract AttributeValue getAttributeValue(Attribute from)
Get the unpersisted attribute value implementation of the Attribute given an existing attribute. The from attribute may be a persistable entity or not but a new instance will be created.

No assumptions should be made about the return type. The raw type might not match the persisted type.

Parameters:
from - the instance supplying the data
Returns:
Returns a value object based on the provided data

getAttributeImpl

public abstract AttributeImpl getAttributeImpl(Attribute from)
Get a persistable implementation of the Attribute given an existing attribute. The from attribute may be a persistable entity or not but a new instance will be created.

No assumptions should be made about the return type. It is possible that the data will be converted to a different persistable type.

Parameters:
from - the instance supplying the data
Returns:
Returns a persistable entity based on the provided data


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.