com.sleepycat.persist.impl
Class FieldInfo

java.lang.Object
  extended by com.sleepycat.persist.impl.FieldInfo
All Implemented Interfaces:
RawField, Serializable, Comparable<FieldInfo>

 class FieldInfo
extends Object
implements RawField, Serializable, Comparable<FieldInfo>

A field definition used by ComplexFormat and CompositeKeyFormat.

Note that the equals(), compareTo() and hashCode() methods only use the name field in this class. Comparing two FieldInfo objects is only done when both are declared in the same class, so comparing the field name is sufficient.

Author:
Mark Hayes

Method Summary
(package private)  void collectRelatedFormats(Catalog catalog, Map<String,Format> newFormats)
           
 int compareTo(FieldInfo o)
           
 boolean equals(Object other)
           
(package private)  String getClassName()
           
(package private) static FieldInfo getField(List<FieldInfo> fields, String fieldName)
           
(package private)  Class getFieldClass()
           
(package private) static int getFieldIndex(List<FieldInfo> fields, String fieldName)
           
(package private) static List<FieldInfo> getInstanceFields(Class cls, ClassMetadata clsMeta)
          Returns a list of all non-transient non-static fields that are declared in the given class.
 String getName()
          Returns the name of the field.
 Format getType()
          Returns the type of the field, without expanding parameterized types, or null if the type is an interface type or the Object class.
 int hashCode()
           
(package private)  void initialize(Catalog catalog, EntityModel model, int initVersion)
           
(package private)  void migrateFromBeta(Map<String,Format> formatMap)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstanceFields

static List<FieldInfo> getInstanceFields(Class cls,
                                         ClassMetadata clsMeta)
Returns a list of all non-transient non-static fields that are declared in the given class.


getField

static FieldInfo getField(List<FieldInfo> fields,
                          String fieldName)

getFieldIndex

static int getFieldIndex(List<FieldInfo> fields,
                         String fieldName)

collectRelatedFormats

void collectRelatedFormats(Catalog catalog,
                           Map<String,Format> newFormats)

migrateFromBeta

void migrateFromBeta(Map<String,Format> formatMap)

initialize

void initialize(Catalog catalog,
                EntityModel model,
                int initVersion)

getFieldClass

Class getFieldClass()

getClassName

String getClassName()

getName

public String getName()
Description copied from interface: RawField
Returns the name of the field.

Specified by:
getName in interface RawField

getType

public Format getType()
Description copied from interface: RawField
Returns the type of the field, without expanding parameterized types, or null if the type is an interface type or the Object class.

Specified by:
getType in interface RawField

compareTo

public int compareTo(FieldInfo o)
Specified by:
compareTo in interface Comparable<FieldInfo>

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2004-2010 Oracle. All rights reserved.