| Home >> All >> org >> apache >> ojb |
Page 1 2
| | org.apache.ojb.broker.* (454) | | org.apache.ojb.ejb.* (23) | | org.apache.ojb.jboss.* (4) |
| | org.apache.ojb.jdori.* (6) | | org.apache.ojb.odmg.* (117) | | org.apache.ojb.otm.* (66) |
| | org.apache.ojb.performance.* (5) | | org.apache.ojb.servlet.* (1) | | org.apache.ojb.soda.* (6) |
| | org.apache.ojb.tools.* (94) |
Package Samples:
org.apache.ojb.broker.util.configuration.impl: This package contains classes that provide the OJB configuration API.
org.apache.ojb.ejb
org.apache.ojb.otm.kit
org.apache.ojb.otm.copy
org.apache.ojb.otm.core
org.apache.ojb.otm.lock.map
org.apache.ojb.otm.lock.wait
org.apache.ojb.otm.lock.isolation
org.apache.ojb.otm.lock
org.apache.ojb.otm.cache.store
org.apache.ojb.otm.cache
org.apache.ojb.otm.swizzle
org.apache.ojb.otm.transaction
org.apache.ojb.otm.states
org.apache.ojb.otm
org.apache.ojb.odmg.oql
org.apache.ojb.odmg.locking
org.apache.ojb.odmg.collections
org.apache.ojb.odmg.transaction
org.apache.ojb.odmg.states
Classes:
PropertyEditor: This class contains all the basic functionality for a property editor. It extends JPanel, so it could be added to a JScrollPane. The PropertyEditor always has an associated PropertyEditorTarget that acts as the "model" for the PropertyEditor To implement your PropertyEditor, you have to design a GUI with all the properties you want the user to see. You have to register the necessary listeners to get notified if a value is changed by the user in order to set the property in the model. Additionally you might want to register a PropertyChangeListener that gets notified if a property is changed in ...
DropTargetHelper: Starting from JDK 1.2 drag and drop was possible for Java applications. Unfortunately the framework to be used is rather complex. As of JDK 1.4 a new, more simple Dnd framework was added, but unfortunately if you want to be backwards compatible, you still have to stick with the old framework. This helper class should make it easier to implement DnD for JDK 1.2 and 1.3. To add drop support for a Component, you only have to write your Implementation of DropPasteWorkerInterface. This interface is responsible to read data from a Transferable and add it to the model of the target component. DropTargetHelper ...
ODMGSessionBean: This is an session bean implementation using odmg implementation. For more structured implementations take a look at SessionBeanImpl ODMGBaseBeanImpl PBBaseBeanImpl How to use ODMG In every bean method you must start with one of following operations: Open a new Database using the Implementation instance. Database db = odmg.newDatabase(); db.open(...); // ... do something db.close(); Obtain the current Database from the Implementation instance - Attend that there must be already a Database opened before. db = odmg.getDatabase(null); // ... do something Obtain the current odmg-Transaction from the ...
MetadataManager: Central class for metadata operations - manages all OJB's DescriptorRepository and ConnectionRepository instances. Allow a bunch of different repository handling possibilities - allows a transparent flexible metadata manipulation at runtime. Per default the manager handle one global DescriptorRepository for all calling threads, but you could enable a per thread 55 handling. This enables to set a different DescriptorRepository for each calling thread. This allows a per thread manipulation of the persistent object metadata at runtime.
LockManagerDefaultImpl: The OJB default implementation of a Locking mechanism. This Implementation supports 4 transaction isolation levels as specified in the interface org.apache.ojb.broker.metadata.IsolationLevels: public final int IL_READ_UNCOMMITTED = 0; public final int IL_READ_COMMITTED = 1; public final int IL_REPEATABLE_READ = 2; public final int IL_SERIALIZABLE = 3; Isolationlevels can be adjusted per class. The proper lockhandling is done in the respective LockStrategy implementation. This default implementation provides persistent Locks that are stored in a special database table. To keep the locks in the database ...
SequenceManagerInMemoryImpl: Very fast in memory sequence manager implementation, only the first time an id was requested for a class, the manager query the database for the max id in requested column - all following request were performed in memory. Limitations: do not use in client/server mode do not use in clustered environments do not use if other entities generate id's for objects Implementation configuration properties: Property Key Property Values grabSize Integer entry determines the number of IDs allocated within the H/L sequence manager implementation. Default was '20'. globalSequenceId If set 'true' implementation ...
TransactionAware: TransactionAware is an interface that can be implemented to provide hooks into the Transaction interface provided by ObJectRelationalBridge. Only objects which have a write lock acquired on them can participate in a transaction. To kill a transaction, implement beforeCommit() and throw a TransactionAbortedException. This will force the entire transaction to rollback. To rebuild an object after a rollback use the afterAbort() call. This is a good place to populate transient or other variables. beforeAbort and afterCommit are there for informational purposes. Here are some common ways you can expect ...
Query: represents Queries that can be used by the OJB PersistenceBroker to retrieve Objects from the underlying DB. Until now there are two implementations: 1. QueryByCriteria, represents SELECT * FROM ... WHERE ... queries 2. QueryByIdentity, uses Example objects or OIDs as templates for the db lookup there could additional implementations, e.g for user defined SQL For the Criteria API I reused code from the COBRA project, as you will see by their class comments. I removed all stuff that relies on knowlegde of the DataDictionary or MetaData layer. The Query and Criteria classes thus don't know how to ...
CacheFilterRegistry: This Meta-ObjectCache implementation enabled the CacheFilter feature support. With the addCacheFilter(org.apache.ojb.broker.cache.CacheFilter) 55 method CacheFilter could be add. Note: Using this meta cache will affect the cache performance, thus do not add too many CacheFilter .
SequenceManagerSeqHiLoImpl: A High/Low database sequence based implementation. See SequenceManagerNextValImpl for more information. Limitations: do not use when other applications use the database sequence ditto Implementation configuration properties: Property Key Property Values grabSize Integer entry determines the number of IDs allocated within the H/L sequence manager implementation. Default was '20'.
SequenceManagerNextValImpl: This SequenceManager implementation uses database sequence key generation (e.g supported by Oracle, SAP DB, PostgreSQL, ...). This class is responsible for creating new unique ID's. It is possible to define a sequence-name field-descriptor attribute in the repository file. If such an attribute was not found, the implementation build an extent aware sequence name by its own. Keep in mind when define a sequence name, that you are responsible to be aware of extents, that is: if you ask for an uid for an interface with several implementor classes, or a baseclass with several subclasses the returned ...
DragHelper: This class allows you to implement the drag of DnD in your GUI by simply creating an instance of this class, supplying your implementation of a DragCopyCutWorkerInterface and register the Component with the helper using registerCopmponent(). If the default implementation of DnD by this class doesn't satisfy your needs you can override all of the functionality by supplying your own DragGestureListener and DragSourceListener. Those interfaces are part of the Java 1.2/1.3 Dnd framework, so more information about these interfaces can be found in the JDK docs. This class is closely related to DropTargetHelper, ...
SequenceManagerHighLowImpl: High/Low sequence manager implementation generates unique and continuous id's (during runtime) by using sequences to avoid database access. Implementation configuration properties: Property Key Property Values grabSize Integer entry determines the number of IDs allocated within the H/L sequence manager implementation. Default was '20'. globalSequenceId If set 'true' implementation use global unique id's for all fields. This modus is NOT extent aware! Default was 'false'.
PerfMain: The OJB stress/performance test - a simple performance test framework for testing multi-threaded environments. You have two possibilities to run this test: - use the build script and call bin/build.sh perf-test or bin\build.bat perf-test - or perform the test class by yourself java -classpath CLASSPATH org.apache.ojb.performance.PerfMain [comma separated list of PerfTest implementation classes, no blanks!] [number of test loops] [number of threads] [number of insert/fetch/delete loops per thread] [boolean - run in stress mode if set true, run in performance mode if set false, default false] For ...
SequenceManager: SequenceManagers are responsible for creating new unique ID's - unique accross all extent objects. There are some standard sequence manager implementations in this package. SequenceManager objects are obtained from a Factory called SequenceManagerFactory . This Factory can be configured to provide instances of user defined implementors of this interface. SequenceManagers should be aware of extents, that is: if you ask for an uid for an Interface (more exact for one implementor class) with several implementor classes, or a baseclass with several subclasses the returned uid should be unique accross ...
CacheFilterPackageImpl: A CacheFilter implementation for filtering objects before cached when the given objects package name match a given package, defined as custom attribute within the descriptor-repository element or jdbc-connection-descriptor in the repository file. Example: Add this custom attribute to a jdbc-connection-descriptor to avoid caching of package trees for the described connection. <attribute attribute-name="exclude-packages" attribute-value="org.my.test,org.my.admin"/> To enable a global exclude of caching, add the custom attribute entry under the descriptor-repository element.
ObjectCache: The ObjectCache stores all Objects loaded by the PersistenceBroker from a DB. When the PersistenceBroker tries to get an Object by its Primary key values it first lookups the cache if the object has been already loaded and cached. Using an ObjectCache has several advantages: - it increases performance as it reduces DB lookups. - it allows to perform circular lookups (as by crossreferenced objects) that would result in non-terminating loops without such a cache. - it maintains the uniqueness of objects as any Db row will be mapped to exactly one object. This interface allows to have userdefined ...
Configurator: The Configurator interface defines methods for looking up Configurations and for configuring Configurable instances. call sequence: 1. The application obtains a Configurator instance (typically from a Factory). 2. The application uses the Configurator to configure Configurable instances. The Configurator must lookup the proper Configuration and invoke the configure method on the Configurable instance. // 1. obtain Configurator Configurator configurator = OjbConfigurator.getInstance(); // 2. ask Configurator to configure the Configurable instance Configurable obj = ... configurator.configure(ob ...
ObjectCacheDefaultImpl: The ObjectCache stores all Objects loaded by the PersistenceBroker from a DB. When the PersistenceBroker tries to get an Object by its Primary key values it first lookups the cache if the object has been already loaded and cached. Using an ObjectCache has several advantages: - it increases performance as it reduces DB lookups. - it allows to perform circular lookups (as by crossreferenced objects) that would result in non-terminating loops without such a cache. - it maintains the uniqueness of objects as any Db row will be mapped to exactly one object. The cache uses soft-references which allows ...
Base64: Encodes and decodes to and from Base64 notation. Change Log: v1.3.5 - Added flag to turn on and off line breaks. Fixed bug in input stream where last buffer being read, if not completely full, was not returned. v1.3.4 - Fixed when "improperly padded stream" error was thrown at the wrong time. v1.3.3 - Fixed I/O streams which were totally messed up. I am placing this code in the Public Domain. Do with it as you will. This software comes with no guarantees or warranties but with plenty of well-wishing instead! Please visit http://iharder.net/xmlizable periodically to check for updates or to contribute ...
SequenceDescriptor: Encapsulates sequence manager configuration properties managed by JdbcConnectionDescriptor . All sequence manager implementation specific configuration attributes are represented by key/value pairs in a Properties object and could be reached via getConfigurationProperties() 55 or getConfigurationProperty(String key) 55 .
ODMGBaseBeanImpl: Base class for using OJB-ODMG api within SessionBeans, subclass this class to implement your own bean implementations. Do not close the Database instance after use, this was done on ejbRemove. To get the org.odmg.Database or org.odmg.Implementation instance use the getDatabase() 55 and getImplementation() 55 methods. Additionally there are some basic methods for storing, deleting, counting, get all objects implemented.
MetaObjectCachePerClassImpl: This global cache makes it possible to have separate cache implementations for each class. When an object is cached / looked up the MetaObjectCachePerClassImpl checks if a special ObjectCache has been set for this class. It recursively looks up the superclasses of the given object to look for a special cache. If no special cache is found it uses the ObjectCacheDefaultImpl to cache the object. It is also possible to switch off caching for a specific class by setting the object cache to null.
QueryByIdentity: represents a search by identity. "find the article with id 7" could be represented as: Article example = new Article(); example.setId(7); Query qry = new QueryByIdentity(example); The PersistenceBroker can retrieve Objects by examples as follows: PersistenceBroker broker = PersistenceBrokerFactory.createPersistenceBroker(); Collection col = broker.getObjectByQuery(qry); This Class can also handle working with OJB Identity objects: "find the article with Identity xyz" could be represnted as Identity xyz = new Identity(example); Query qry = new QueryByIdentity(xyz);
RepositoryTags: this class maintains a table mapping the xml-tags used in the repository.dtd to their corresponding ids used within OJB. This table is used in 1. the RepositoryXmlHandler to identify tags on parsing the repository.xml in a large switch statement. 2. in the RepositoryPersistor to get the proper tag for a given XmlCapable id during assembling the repository.xml for output. Important note: This class is the only place where XML tags from the repository.dtd are maintained. All usages of these tags within OJB must use this table to ease changes of the DTD.
| Home | Contact Us | Privacy Policy | Terms of Service |