This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Integrator { | |
public void prepareServices(ServiceRegistryBuilder serviceRegistryBuilder); | |
public void prepareMetadata(MetadataImplementor metadata); | |
public void integrate( | |
MetadataImplementor metadata, | |
SessionFactoryImplementor sessionFactory, | |
SessionFactoryServiceRegistry serviceRegistry); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface EntityLoadAccess<T> { | |
public T getReference(Object key); | |
public T getReference(Object key, LockOptions lockOptions); | |
public T load(Object key); | |
public T load(Object key, LockOptions lockOptions); | |
} | |
session.entityLoadAccess( SomeEntity.class ).byId().getReference( 123 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface EntityLoadAccess<T> { | |
public T getReferenceById(Object id); | |
public T getReferenceById(Object id, LockOptions lockOptions); | |
public T getReferenceByNaturalKey(Object key); | |
public T getReferenceByNaturalKey(Object key, LockOptions lockOptions); | |
public T loadById(Object id); | |
public T loadById(Object id, LockOptions lockOptions); | |
public T loadByNaturalKey(Object key); | |
public T loadByNaturalKey(Object key, LockOptions lockOptions); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Specifically access by id | |
*/ | |
interface IdentifierLoadAccess<T> { | |
public IdentifierLoadAccess<T> with(LockOptions lockOptions); | |
public T getReference(Object id); | |
public T load(Object id); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface JdbcCoordinator extends Serializable { | |
/** | |
* Set the effective transaction timeout period for the current transaction, in seconds. | |
* | |
* NOTE : Same signature, just added javadocs... | |
*/ | |
public void setTransactionTimeOut(int seconds); | |
/** | |
* Retrieve the amount of time, in seconds, still remaining before transaction timeout occurs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
try { | |
PreparedStatement st = session.getTransactionCoordinator().getJdbcCoordinator().getStatementPreparer().prepareStatement( sql ); | |
try { | |
getLockable().getIdentifierType().nullSafeSet( st, id, 1, session ); | |
if ( getLockable().isVersioned() ) { | |
getLockable().getVersionType().nullSafeSet( | |
st, | |
version, | |
getLockable().getIdentifierType().getColumnSpan( factory ) + 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logicalExpression | |
: logicalOrExpression | |
; | |
logicalOrExpression | |
: logicalAndExpression ( or^ logicalAndExpression )* | |
; | |
logicalAndExpression | |
: negatedExpression ( and^ negatedExpression )* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Hibernate team is pleased to announce the release of Hibernate Core 4.0.0.Final. A lot of time and effort from many people went into this release, so thank you everyone involved! | |
++ What's new? | |
A lot of things; too many to list here. But here is a list of the major improvements done in 4.0: | |
# Initial multi-tenancy support. See [=>http://in.relation.to/Bloggers/HibernateAndMultitenancyWebinar] and [=>http://in.relation.to/Bloggers/MultitenancyInHibernate] for more information. | |
# Introduction of ServiceRegistry. This is a major change in how Hibernate builds and manages "services". See the information in the *Hibernate Developer Guide*. | |
# Clean up of Session opening from SessionFactory | |
# Improved integration via org.hibernate.integrator.spi.Integrator and auto discovery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Caused by: javax.xml.stream.XMLStreamException: org.xml.sax.SAXParseException; lineNumber: 7; columnNumber: 10; cvc-complex-type.2.4.a: Invalid content was found starting with element 'entity-mappings'. One of '{"http://java.sun.com/xml/ns/persistence/orm":description, "http://java.sun.com/xml/ns/persistence/orm":persistence-unit-metadata, "http://java.sun.com/xml/ns/persistence/orm":package, "http://java.sun.com/xml/ns/persistence/orm":schema, "http://java.sun.com/xml/ns/persistence/orm":catalog, "http://java.sun.com/xml/ns/persistence/orm":access, "http://java.sun.com/xml/ns/persistence/orm":sequence-generator, "http://java.sun.com/xml/ns/persistence/orm":table-generator, "http://java.sun.com/xml/ns/persistence/orm":named-query, "http://java.sun.com/xml/ns/persistence/orm":named-native-query, "http://java.sun.com/xml/ns/persistence/orm":sql-result-set-mapping, "http://java.sun.com/xml/ns/persistence/orm":mapped-superclass, "http://java.sun.com/xml/ns/persistence/orm":entity, "http://java.sun.com/xml/ns/pers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NamedQueryRepository { | |
/** | |
* Defines allowable policies for handling attempts to mutate a repository after initialization | |
*/ | |
public static enum MutationPolicy { | |
/** | |
* Allow attempts to mutate the repository after it has been initialized. | |
*/ | |
ALLOW, | |
/** |