Package com.db4o.internal
Class StoredClassImpl
- java.lang.Object
-
- com.db4o.internal.StoredClassImpl
-
- All Implemented Interfaces:
StoredClass
public class StoredClassImpl extends java.lang.Object implements StoredClass
-
-
Constructor Summary
Constructors Constructor Description StoredClassImpl(Transaction transaction, ClassMetadata classMetadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)long[]getIDs()returns an array of IDs of all stored object instances of this stored class.java.lang.StringgetName()returns the name of this stored class.StoredClassgetParentStoredClass()returns the StoredClass for the parent of the class, this StoredClass represents.StoredField[]getStoredFields()returns all stored fields of this stored class.booleanhasClassIndex()returns true if this StoredClass has a class index.inthashCode()intinstanceCount()Returns the number of instances of this class that have been persisted to the database, as seen by the transaction (container) that produces this StoredClass instance.voidrename(java.lang.String newName)renames this stored class.StoredFieldstoredField(java.lang.String name, java.lang.Object type)returns an existing stored field of this stored class.java.lang.StringtoString()
-
-
-
Constructor Detail
-
StoredClassImpl
public StoredClassImpl(Transaction transaction, ClassMetadata classMetadata)
-
-
Method Detail
-
getIDs
public long[] getIDs()
Description copied from interface:StoredClassreturns an array of IDs of all stored object instances of this stored class.- Specified by:
getIDsin interfaceStoredClass
-
getName
public java.lang.String getName()
Description copied from interface:StoredClassreturns the name of this stored class.- Specified by:
getNamein interfaceStoredClass
-
getParentStoredClass
public StoredClass getParentStoredClass()
Description copied from interface:StoredClassreturns the StoredClass for the parent of the class, this StoredClass represents.- Specified by:
getParentStoredClassin interfaceStoredClass
-
getStoredFields
public StoredField[] getStoredFields()
Description copied from interface:StoredClassreturns all stored fields of this stored class.- Specified by:
getStoredFieldsin interfaceStoredClass
-
hasClassIndex
public boolean hasClassIndex()
Description copied from interface:StoredClassreturns true if this StoredClass has a class index.- Specified by:
hasClassIndexin interfaceStoredClass
-
rename
public void rename(java.lang.String newName)
Description copied from interface:StoredClassrenames this stored class.
After renaming one or multiple classes the ObjectContainer has to be closed and reopened to allow internal caches to be refreshed.
.NET: As the name you should provide [Classname, Assemblyname]- Specified by:
renamein interfaceStoredClass- Parameters:
newName- the new name
-
storedField
public StoredField storedField(java.lang.String name, java.lang.Object type)
Description copied from interface:StoredClassreturns an existing stored field of this stored class.- Specified by:
storedFieldin interfaceStoredClass- Parameters:
name- the name of the fieldtype- the type of the field. There are four possibilities how to supply the type:
- a Class object. (.NET: a Type object)
- a fully qualified classname.
- any object to be used as a template.
- null, if the first found field should be returned.- Returns:
- the
StoredField
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
instanceCount
public int instanceCount()
Description copied from interface:StoredClassReturns the number of instances of this class that have been persisted to the database, as seen by the transaction (container) that produces this StoredClass instance.- Specified by:
instanceCountin interfaceStoredClass- Returns:
- The number of instances
-
-