public class HibernateUtils extends Object
Constructor and Description |
---|
HibernateUtils() |
Modifier and Type | Method and Description |
---|---|
Collection<Role> |
getAllRoles(Collection services)
Retrieves all roles from the given
services collection. |
static String |
getDate()
Returns the current Date in the specified format.
|
static String |
getDate(String format)
Returns the current Date in the specified format.
|
String |
getHibernatePackage()
Retrieves the appropriate Hibernate package for the given version.
|
String |
getHibernateUserTypePackage()
Retrieves the appropriate package for Hibernate user types given
the version defined within this class.
|
static String |
getInheritanceTypeEnum(String hibernateMappingStrategy)
Needed for InheritanceType enumeration in hibernate annotations
|
boolean |
isMapSubclassesInSeparateFile() |
boolean |
isVersion2()
Indicates whether or not Hibernate 2 is enabled.
|
static boolean |
isVersion2(String hibernateVersionPropertyValue)
Indicates whether or not the given property value is version 3 or not.
|
boolean |
isVersion3()
Indicates whether or not Hibernate 3 is enabled.
|
static boolean |
isVersion3(String hibernateVersionPropertyValue)
Indicates whether or not the given property value is version 3 or not.
|
boolean |
isVersion4()
Indicates whether or not Hibernate 3 is enabled.
|
static boolean |
isVersion4(String hibernateVersionPropertyValue)
Indicates whether or not the given property value is version 3 or not.
|
boolean |
isXmlPersistenceActive() |
static boolean |
isXmlPersistenceActive(String hibernateVersionPropertyValue,
String hibernateXMLPersistencePropertyValue) |
static boolean |
mapSubclassesInSeparateFile(String hibernateMappingStrategy) |
void |
setHibernateMappingStrategy(String hibernateMappingStrategy) |
void |
setHibernateVersion(String hibernateVersion)
Sets the version of Hibernate we're generating for.
|
void |
setHibernateXMLPersistence(String hibernateXmlPersistence) |
public HibernateUtils()
public Collection<Role> getAllRoles(Collection services)
services
collection.services
- the collection services.public void setHibernateVersion(String hibernateVersion)
hibernateVersion
- The version to set.public String getHibernatePackage()
public String getHibernateUserTypePackage()
public boolean isVersion2()
public boolean isVersion3()
public boolean isVersion4()
public static boolean isVersion2(String hibernateVersionPropertyValue)
hibernateVersionPropertyValue
- the value of the propertypublic static boolean isVersion3(String hibernateVersionPropertyValue)
hibernateVersionPropertyValue
- the value of the propertypublic static boolean isVersion4(String hibernateVersionPropertyValue)
hibernateVersionPropertyValue
- the value of the propertypublic void setHibernateXMLPersistence(String hibernateXmlPersistence)
hibernateXmlPersistence
- true
when you to make use of Hibernate 3 XML persistence support,
false
otherwisepublic boolean isXmlPersistenceActive()
public static boolean isXmlPersistenceActive(String hibernateVersionPropertyValue, String hibernateXMLPersistencePropertyValue)
hibernateVersionPropertyValue
- hibernateXMLPersistencePropertyValue
- public void setHibernateMappingStrategy(String hibernateMappingStrategy)
hibernateMappingStrategy
- public boolean isMapSubclassesInSeparateFile()
public static boolean mapSubclassesInSeparateFile(String hibernateMappingStrategy)
hibernateMappingStrategy
- public static String getInheritanceTypeEnum(String hibernateMappingStrategy)
hibernateMappingStrategy
- public static String getDate(String format)
format
- The format for the output dateCopyright © 2003–2014 AndroMDA.org. All rights reserved.