Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Page 1   2   3   4  
org.hibernate.action.* (12)  
org.hibernate.auction.* (8)org.hibernate.bytecode.* (23)
org.hibernate.cache.* (43)org.hibernate.cfg.* (16)
org.hibernate.classic.* (4)org.hibernate.collection.* (14)
org.hibernate.connection.* (7)org.hibernate.context.* (4)

org.hibernate: Javadoc index of package org.hibernate.


Package Samples:

org.hibernate.auction
org.hibernate.action
org.hibernate.cache.entry
org.hibernate.cache
org.hibernate.cfg
org.hibernate.classic
org.hibernate.collection
org.hibernate.connection
org.hibernate.bytecode.cglib
org.hibernate.bytecode.javassist
org.hibernate.bytecode
org.hibernate.context

Classes:

Environment: Provides access to configuration info passed in Properties objects. Hibernate has two property scopes: Factory-level properties may be passed to the SessionFactory when it instantiated. Each instance might have different property values. If no properties are specified, the factory calls Environment.getProperties() . System-level properties are shared by all factory instances and are always determined by the Environment properties. The only system-level properties are hibernate.jdbc.use_streams_for_binary hibernate.cglib.use_reflection_optimizer Environment properties are populated by calling System.getProperties() ...
CacheConcurrencyStrategy: Implementors manage transactional access to cached data. Transactions pass in a timestamp indicating transaction start time. Two different implementation patterns are provided for. A transaction-aware cache implementation might be wrapped by a "synchronous" concurrency strategy, where updates to the cache are written to the cache inside the transaction. A non transaction-aware cache would be wrapped by an "asynchronous" concurrency strategy, where items are merely "soft locked" during the transaction and then updated during the "after transaction completion" phase; the soft lock is not an actual ...
Session: The main runtime interface between a Java application and Hibernate. This is the central API class abstracting the notion of a persistence service. The lifecycle of a Session is bounded by the beginning and end of a logical transaction. (Long transactions might span several database transactions.) The main function of the Session is to offer create, read and delete operations for instances of mapped entity classes. Instances may exist in one of three states: transient: never persistent, not associated with any Session persistent: associated with a unique Session detached: previously persistent, ...
ThreadLocalSessionContext: A CurrentSessionContext impl which scopes the notion of current session by the current thread of execution. Unlike the JTA counterpart, threads do not give us a nice hook to perform any type of cleanup making it questionable for this impl to actually generate Session instances. In the interest of usability, it was decided to have this default impl actually generate a session upon first request and then clean it up after the org.hibernate.Transaction associated with that session is committed/rolled-back. In order for ensuring that happens, the sessions generated here are unusable until after Session.beginTransaction() ...
ManagedSessionContext: Represents a CurrentSessionContext the notion of a contextual session is managed by some external entity (generally some form of interceptor, etc). This external manager is responsible for scoping these contextual sessions appropriately binding/unbinding them here for exposure to the application through SessionFactory.getCurrentSession() > SessionFactory.getCurrentSession() 55 calls. Basically exposes two interfaces. First is the implementation of CurrentSessionContext which is then used by the SessionFactory.getCurrentSession() > SessionFactory.getCurrentSession() 55 calls. This portion is instance-based ...
JTASessionContext: An implementation of CurrentSessionContext which scopes the notion of a current session to a JTA transaction. Because JTA gives us a nice tie-in to clean up after ourselves, this implementation will generate Sessions as needed provided a JTA transaction is in effect. If a session is not already associated with the current JTA transaction at the time currentSession() 55 is called, a new session will be opened and it will be associated with that JTA transaction. Note that the sessions returned from this method are automatically configured with both the auto-flush 55 and auto-close 55 attributes set ...
NestableException: The base class of all exceptions which can contain other exceptions. It is intended to ease the debugging by carrying on the information about the exception which was caught and provoked throwing the current exception. Catching and rethrowing may occur multiple times, and provided that all exceptions except the first one are descendands of NestedException , when the exception is finally printed out using any of the printStackTrace() methods, the stacktrace will contain the information about all exceptions thrown and caught on the way. Running the following program 1 import org.apache.commons.lang.exception.NestableException; ...
Criteria: Criteria is a simplified API for retrieving entities by composing Criterion objects. This is a very convenient approach for functionality like "search" screens where there is a variable number of conditions to be placed upon the result set. The Session is a factory for Criteria . Criterion instances are usually obtained via the factory methods on Restrictions . eg. List cats = session.createCriteria(Cat.class) .add( Restrictions.like("name", "Iz%") ) .add( Restrictions.gt( "weight", new Float(minWeight) ) ) .addOrder( Order.asc("age") ) .list(); You may navigate associations using createAlias() ...
Query: An object-oriented representation of a Hibernate query. A Query instance is obtained by calling Session.createQuery() . This interface exposes some extra functionality beyond that provided by Session.iterate() and Session.find() : a particular page of the result set may be selected by calling setMaxResults(), setFirstResult() named query parameters may be used the results may be returned as an instance of ScrollableResults Named query parameters are tokens of the form :name in the query string. A value is bound to the integer parameter :foo by calling setParameter("foo", foo, Hibernate.INTEGER); ...
EhCacheProvider: Cache Provider plugin for ehcache-1.2. New in this provider are ehcache support for multiple Hibernate session factories, each with its own ehcache configuration, and non Serializable keys and values. Ehcache-1.2 also has many other features such as cluster support and listeners, which can be used seamlessly simply by configurion in ehcache.xml. Use hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider in the Hibernate configuration to enable this provider for Hibernate's second level cache. When configuring multiple ehcache CacheManagers, as you would where you have multiple Hibernate ...
Tuplizer: A tuplizer defines the contract for things which know how to manage a particular representation of a piece of data, given that representation's org.hibernate.EntityMode (the entity-mode essentially defining which representation). If that given piece of data is thought of as a data structure, then a tuplizer is the thing which knows how to create such a data structure appropriately extract values from and inject values into such a data structure For example, a given piece of data might be represented as a POJO class. Here, it's representation and entity-mode is POJO. Well a tuplizer for POJO entity-modes ...
MultipleHiLoPerTableGenerator: A hilo IdentifierGenerator that returns a Long , constructed using a hi/lo algorithm. The hi value MUST be fetched in a seperate transaction to the Session transaction so the generator must be able to obtain a new connection and commit it. Hence this implementation may not be used when the user is supplying connections. In this case a SequenceHiLoGenerator would be a better choice (where supported). A hilo IdentifierGenerator that uses a database table to store the last generated values. A table can contains several hi values. They are distinct from each other through a key This implementation ...
Lifecycle: Provides callbacks from the Session to the persistent object. Persistent classes may implement this interface but they are not required to. onSave: called just before the object is saved onUpdate: called just before an object is updated, ie. when Session.update() is called onDelete: called just before an object is deleted onLoad: called just after an object is loaded onLoad() may be used to initialize transient properties of the object from its persistent state. It may not be used to load dependent objects since the Session interface may not be invoked from inside this method. A further intended ...
PersistentCollection: Persistent collections are treated as value objects by Hibernate. ie. they have no independent existence beyond the object holding a reference to them. Unlike instances of entity classes, they are automatically deleted when unreferenced and automatically become persistent when held by a persistent object. Collections can be passed between different objects (change "roles") and this might cause their elements to move from one database table to another. Hibernate "wraps" a java collection in an instance of PersistentCollection. This mechanism is designed to support tracking of changes to the collection's ...
BytecodeProvider: Contract for providers of bytecode services to Hibernate. Bytecode requirements break down into basically 4 areas proxy generation (both for runtime-lazy-loading and basic proxy generation) getProxyFactoryFactory() 55 bean relection optimization getReflectionOptimizer(java.lang.Class, java.lang.String[], java.lang.String[], java.lang.Class[]) 55 build-time instumentation (not covered by this contract) class-load intrumentation generateDynamicFieldInterceptionClassLoader(java.lang.ClassLoader, java.lang.String[], java.lang.String[]) 55 ; (currently only used in the test suite).
StatisticsService: JMX service for Hibernate statistics Register this MBean in your JMX server for a specific session factory //build the ObjectName you want Hashtable tb = new Hashtable(); tb.put("type", "statistics"); tb.put("sessionFactory", "myFinancialApp"); ObjectName on = new ObjectName("hibernate", tb); StatisticsService stats = new StatisticsService(); stats.setSessionFactory(sessionFactory); server.registerMBean(stats, on); And call the MBean the way you want Register this MBean in your JMX server with no specific session factory //build the ObjectName you want Hashtable tb = new Hashtable(); tb.put("type", ...
UserType: This interface should be implemented by user-defined "types". A "type" class is not the actual property type - it is a class that knows how to serialize instances of another class to and from JDBC. This interface abstracts user code from future changes to the Type interface, simplifies the implementation of custom types and hides certain "internal" interfaces from user code. Implementors must be immutable and must declare a public default constructor. The actual class mapped by a UserType may be just about anything. CompositeUserType provides an extended version of this interface that is useful ...
TypeNames: This class maps a type to names. Associations may be marked with a capacity. Calling the get() method with a type and actual size n will return the associated name with smallest capacity >= n, if available and an unmarked default type otherwise. Eg, setting names.put(type, "TEXT" ); names.put(type, 255, "VARCHAR($l)" ); names.put(type, 65534, "LONGVARCHAR($l)" ); will give you back the following: names.get(type) // --> "TEXT" (default) names.get(type, 100) // --> "VARCHAR(100)" (100 is in [0:255]) names.get(type, 1000) // --> "LONGVARCHAR(1000)" (1000 is in [256:65534]) names.get(type, 100000) ...
Interceptor: Allows user code to inspect and/or change property values. Inspection occurs before property values are written and after they are read from the database. There might be a single instance of Interceptor for a SessionFactory , or a new instance might be specified for each Session . Whichever approach is used, the interceptor must be serializable if the Session is to be serializable. This means that SessionFactory -scoped interceptors should implement readResolve() . The Session may not be invoked from a callback (nor may a callback cause a collection or proxy to be lazily initialized). Instead of ...
CurrentSessionContext: Defines the contract for implementations which know how to scope the notion of a current session 55 . Implementations should adhere to the following: contain a constructor accepting a single argument of type org.hibernate.engine.SessionFactoryImplementor should be thread safe should be fully serializable Implementors should be aware that they are also fully responsible for cleanup of any generated current-sessions. Note that there will be exactly one instance of the configured CurrentSessionContext implementation per org.hibernate.SessionFactory .
InstrumentTask: An Ant task for instrumenting persistent classes in order to enable field-level interception using Javassist. In order to use this task, typically you would define a a taskdef similiar to: where lib.class.path is an ANT path reference containing all the required Hibernate and Javassist libraries. And then use it like: ... where the nested ANT fileset includes the class you would like to have instrumented.
SoftLimitMRUCache: Cache following a "Most Recently Used" (MRY) algorithm for maintaining a bounded in-memory size; the "Least Recently Used" (LRU) entry is the first available for removal from the cache. This implementation uses a "soft limit" to the in-memory size of the cache, meaning that all cache entries are kept within a completely java.lang.ref.SoftReference -based map with the most recently utilized entries additionally kept in a hard-reference manner to prevent those cache entries soft references from becoming enqueued by the garbage collector. Thus the actual size of this cache impl can actually grow beyond ...
InstrumentTask: An Ant task for instrumenting persistent classes in order to enable field-level interception using CGLIB. In order to use this task, typically you would define a a taskdef similiar to: where lib.class.path is an ANT path reference containing all the required Hibernate and CGLIB libraries. And then use it like: ... where the nested ANT fileset includes the class you would like to have instrumented.
SessionFactoryImpl: Concrete implementation of the SessionFactory interface. Has the following responsibilites caches configuration settings (immutably) caches "compiled" mappings ie. EntityPersister s and CollectionPersister s (immutable) caches "compiled" queries (memory sensitive cache) manages PreparedStatement s delegates JDBC Connection management to the ConnectionProvider factory for instances of SessionImpl This class must appear immutable to clients, even if it does all kinds of caching and pooling under the covers. It is crucial that the class is not only thread safe, but also highly concurrent. Synchronization ...
OptimisticCache: A contract for transactional cache implementations which support optimistic locking of items within the cache. The optimisitic locking capabilities are only utilized for the entity cache regions. Unlike the methods on the Cache interface, all the methods here will only ever be called from access scenarios where versioned data is actually a possiblity (i.e., entity data). Be sure to consult with OptimisticCacheSource.isVersioned() 55 to determine whether versioning is actually in effect.

Home | Contact Us | Privacy Policy | Terms of Service