org.hibernate.ogm.dialect.mongodb
Class MongoDBDialect
java.lang.Object
org.hibernate.ogm.dialect.mongodb.MongoDBDialect
- All Implemented Interfaces:
- Serializable, GridDialect, org.hibernate.service.Service
public class MongoDBDialect
- extends Object
- implements GridDialect
Each Tuple entry is stored as a property in a MongoDB document.
Each association is stored in an association document containing three properties:
- the association table name (optionally)
- the RowKey column names and values
- the tuples as an array of elements
Associations can be stored as:
- one MongoDB collection per association class. The collection name is prefixed.
- one MongoDB collection for all associations (the association table name property in then used)
- embed the collection info in the owning entity document is planned but not supported at the moment (OGM-177)
Collection of embeddable are stored within the owning entity document under the
unqualified collection role
- Author:
- Guillaume Scheibel , Alan Fitton , Emmanuel Bernard
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ID_FIELDNAME
public static final String ID_FIELDNAME
- See Also:
- Constant Field Values
PROPERTY_SEPARATOR
public static final String PROPERTY_SEPARATOR
- See Also:
- Constant Field Values
SEQUENCE_VALUE
public static final String SEQUENCE_VALUE
- See Also:
- Constant Field Values
ROWS_FIELDNAME
public static final String ROWS_FIELDNAME
- See Also:
- Constant Field Values
TABLE_FIELDNAME
public static final String TABLE_FIELDNAME
- See Also:
- Constant Field Values
ASSOCIATIONS_COLLECTION_PREFIX
public static final String ASSOCIATIONS_COLLECTION_PREFIX
- See Also:
- Constant Field Values
MongoDBDialect
public MongoDBDialect(MongoDBDatastoreProvider provider)
getLockingStrategy
public org.hibernate.dialect.lock.LockingStrategy getLockingStrategy(org.hibernate.persister.entity.Lockable lockable,
org.hibernate.LockMode lockMode)
- Specified by:
getLockingStrategy in interface GridDialect
getTuple
public Tuple getTuple(EntityKey key,
TupleContext tupleContext)
- Specified by:
getTuple in interface GridDialect
createTuple
public Tuple createTuple(EntityKey key)
- Specified by:
createTuple in interface GridDialect
updateTuple
public void updateTuple(Tuple tuple,
EntityKey key)
- Specified by:
updateTuple in interface GridDialect
removeTuple
public void removeTuple(EntityKey key)
- Specified by:
removeTuple in interface GridDialect
getAssociation
public Association getAssociation(AssociationKey key,
AssociationContext associationContext)
- Specified by:
getAssociation in interface GridDialect
createAssociation
public Association createAssociation(AssociationKey key)
- Specified by:
createAssociation in interface GridDialect
updateAssociation
public void updateAssociation(Association association,
AssociationKey key)
- Specified by:
updateAssociation in interface GridDialect
removeAssociation
public void removeAssociation(AssociationKey key)
- Specified by:
removeAssociation in interface GridDialect
createTupleAssociation
public Tuple createTupleAssociation(AssociationKey associationKey,
RowKey rowKey)
- Specified by:
createTupleAssociation in interface GridDialect
nextValue
public void nextValue(RowKey key,
org.hibernate.id.IntegralDataTypeHolder value,
int increment,
int initialValue)
- Specified by:
nextValue in interface GridDialect
overrideType
public GridType overrideType(org.hibernate.type.Type type)
- Specified by:
overrideType in interface GridDialect
Copyright © 2010-2012 Hibernate. All Rights Reserved.