com.avaje.ebean.config
Interface CompoundTypeProperty<V,P>

Type Parameters:
V - The type of the Compound value object
P - The type of the property

public interface CompoundTypeProperty<V,P>

Represents a Property of a Compound Value Object.

For each property in a CompoundType you need an implementation of this CompoundTypeProperty interface.

Author:
rbygrave
See Also:
CompoundType, ScalarTypeConverter

Method Summary
 int getDbType()
          This should ONLY be used when the persistence type is different from the logical type returned.
 String getName()
          The name of this property.
 P getValue(V valueObject)
          Return the property value from the containing compound value object.
 

Method Detail

getName

String getName()
The name of this property.


getValue

P getValue(V valueObject)
Return the property value from the containing compound value object.

Parameters:
valueObject - the compound value object
Returns:
the property value.

getDbType

int getDbType()
This should ONLY be used when the persistence type is different from the logical type returned. It most cases just return 0 and Ebean will persist the logical type.

Typically this should be used when the logical type is long but the persistence type is java.sql.Timestamp. In this case return java.sql.Types.TIMESTAMP (rather than 0).

Returns:
Return the java.sql.Type that you want to use to persist this property or 0 and Ebean will use the logical type.


Copyright © 2010. All Rights Reserved.