Package org.hibernate.pretty
Class MessageHelper
- java.lang.Object
-
- org.hibernate.pretty.MessageHelper
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcollectionInfoString(@Nullable String role, @Nullable Object id)Generate an info message string relating to a particular managed collection.static StringcollectionInfoString(@Nullable CollectionPersister persister, @Nullable Object id, SessionFactoryImplementor factory)Generate an info message string relating to a particular managed collection.static StringcollectionInfoString(@Nullable CollectionPersister persister, @Nullable PersistentCollection<?> collection, Object collectionKey, SharedSessionContractImplementor session)Generate an info message string relating to a particular managed collection.static StringcollectionInfoString(@Nullable CollectionPersister persister, Object[] ids, SessionFactoryImplementor factory)Generate an info message string relating to a series of managed collections.static StringinfoString(@Nullable String entityName, @Nullable Object id)Generate an info message string relating to a particular entity, based on the given entityName and id.static StringinfoString(@Nullable EntityPersister persister)Generate an info message string relating to given entity persister.static StringinfoString(@Nullable EntityPersister persister, @Nullable Object id, @Nullable SessionFactoryImplementor factory)Generate an info message string relating to a particular entity.static StringinfoString(@Nullable EntityPersister persister, @Nullable Object id, Type identifierType, SessionFactoryImplementor factory)Generate an info message string relating to a particular entity,.static StringinfoString(@Nullable EntityPersister persister, Object[] ids, SessionFactoryImplementor factory)Generate an info message string relating to a series of entities.static StringinfoString(String entityName, String propertyName, @Nullable Object key)Generate an info message string relating to a given property value for an entity.
-
-
-
Method Detail
-
infoString
public static String infoString(@Nullable String entityName, @Nullable Object id)
Generate an info message string relating to a particular entity, based on the given entityName and id.- Parameters:
entityName- The defined entity name.id- The entity id value.- Returns:
- An info string, in the form [FooBar#1].
-
infoString
public static String infoString(@Nullable EntityPersister persister, @Nullable Object id, @Nullable SessionFactoryImplementor factory)
Generate an info message string relating to a particular entity.- Parameters:
persister- The persister for the entityid- The entity id valuefactory- The session factory - Could be null!- Returns:
- An info string, in the form [FooBar#1]
-
infoString
public static String infoString(@Nullable EntityPersister persister, @Nullable Object id, Type identifierType, SessionFactoryImplementor factory)
Generate an info message string relating to a particular entity,.- Parameters:
persister- The persister for the entityid- The entity id valueidentifierType- The entity identifier type mappingfactory- The session factory- Returns:
- An info string, in the form [FooBar#1]
-
infoString
public static String infoString(@Nullable EntityPersister persister, Object[] ids, SessionFactoryImplementor factory)
Generate an info message string relating to a series of entities.- Parameters:
persister- The persister for the entitiesids- The entity id valuesfactory- The session factory- Returns:
- An info string, in the form [FooBar#<1,2,3>]
-
infoString
public static String infoString(@Nullable EntityPersister persister)
Generate an info message string relating to given entity persister.- Parameters:
persister- The persister.- Returns:
- An info string, in the form [FooBar]
-
infoString
public static String infoString(String entityName, String propertyName, @Nullable Object key)
Generate an info message string relating to a given property value for an entity.- Parameters:
entityName- The entity namepropertyName- The name of the propertykey- The property value.- Returns:
- An info string, in the form [Foo.bars#1]
-
collectionInfoString
public static String collectionInfoString(@Nullable CollectionPersister persister, @Nullable PersistentCollection<?> collection, Object collectionKey, SharedSessionContractImplementor session)
Generate an info message string relating to a particular managed collection. Attempts to intelligently handle property-refs issues where the collection key is not the same as the owner key.- Parameters:
persister- The persister for the collectioncollection- The collection itselfcollectionKey- The collection keysession- The session- Returns:
- An info string, in the form [Foo.bars#1]
-
collectionInfoString
public static String collectionInfoString(@Nullable CollectionPersister persister, Object[] ids, SessionFactoryImplementor factory)
Generate an info message string relating to a series of managed collections.- Parameters:
persister- The persister for the collectionsids- The id values of the ownersfactory- The session factory- Returns:
- An info string, in the form [Foo.bars#<1,2,3>]
-
collectionInfoString
public static String collectionInfoString(@Nullable CollectionPersister persister, @Nullable Object id, SessionFactoryImplementor factory)
Generate an info message string relating to a particular managed collection.- Parameters:
persister- The persister for the collectionid- The id value of the ownerfactory- The session factory- Returns:
- An info string, in the form [Foo.bars#1]
-
collectionInfoString
public static String collectionInfoString(@Nullable String role, @Nullable Object id)
Generate an info message string relating to a particular managed collection.- Parameters:
role- The role-name of the collectionid- The id value of the owner- Returns:
- An info string, in the form [Foo.bars#1]
-
-