Interface | Description |
---|---|
Column<ENTITY,BUILDER> |
Represents a column in a table that holds entity values.
|
Converter<CLASS,CODE> |
This interface describes mechanisms for translating objects from one
type to another and back.
|
Dao<ENTITY> |
A
Dao is an interface that allows basic CRUD operations to be performed. |
DaoDescriptor<ENTITY,ENTITYBUILDER> |
Implementers of this interface completely describe all the information
necessary to persisting objects of type
ENTITY . |
ParentColumn<CHILD,PARENT,CHILDBUILDER,PARENTBUILDER> |
Represents a reference from a child entity to its parent.
|
PrimaryKey<ENTITY,BUILDER> |
Representation of the column that holds the primary key for the entity.
|
Queries |
Represents the generated SQL for doing CRUD operations on some entity.
|
Class | Description |
---|---|
AbstractColumn<TYPE,ENTITY,BUILDER> |
Represents a column in a database table.
|
BooleanConverter |
This
Converter translates true values to "T" and false
values to "F". |
ChildrenDescriptor<PARENT,CHILD,PARENTBUILDER,CHILDBUILDER> |
Complete definition of how a child entity is related to its parent entity.
|
ColumnTypes |
Container for some static data regarding what
Column implementations are
suitable for what SQL types. |
DaoBuilder<ENTITY> |
A DaoBuilder provides mechanisms for defining the relationship between
a Java type and the table(s) that will persist the data held in the class.
|
DaoHelper |
Some small utilities used internally by hrorm.
|
DaoImpl<ENTITY,PARENT,BUILDER,PARENTBUILDER> |
The
Dao implementation. |
DataColumnFactory |
Mechanisms for creating columns that can handle persistence of various Java types.
|
DirectPrimaryKey<ENTITY> |
Primary key for an entity whose construction is direct, i.e.
|
Envelope<T> |
A simple holder for data objects that can package
it with its own ID.
|
IndirectDaoBuilder<ENTITY,BUILDER> |
An
IndirectDaoBuilder is used for times when the class representing
the persisted entity is immutable. |
IndirectPrimaryKey<ENTITY,BUILDER> |
Primary key for an entity whose construction is indirect, i.e.
|
JoinColumn<ENTITY,JOINED,ENTITYBUILDER,JOINEDBUILDER> |
Represents a column that links to a foreign key of some
other entity.
|
NoBackReferenceParentColumn<ENTITY,PARENT,BUILDER,PARENTBUILDER> |
Represents a reference from a child entity to its parent where the
child class has no reference to the parent.
|
ParentColumnImpl<CHILD,PARENT,CHILDBUILDER,PARENTBUILDER> |
Represents a reference from a child entity to its parent where
the child class has a pointer back to the parent.
|
PopulateResult |
Indication of the result, and work remaining, after an item has been populated.
|
Prefixer |
Utility for providing unique prefixes in a fixed pattern.
|
RelativeDaoDescriptor<ENTITY,PARENT,ENTITYBUILDER> |
An implementation of a
DaoDescriptor that has its
prefixes shifted. |
SqlBuilder<ENTITY> |
This class generates SQL strings suitable to be used in
PreparedStatement s. |
SqlRunner<ENTITY,BUILDER> |
This class does the heavy lifting of creating
Statement s,
executing SQL, and parsing ResultSet s. |
Transactor |
An aid for managing transactions.
|
Validator |
A utility for checking whether or not the configuration of a
Dao
matches the database schema. |
Exception | Description |
---|---|
HrormException |
A
RuntimeException that often wraps SQLException . |
Hrorm provides a mechanism for building Dao
objects.
Hrorm Dao
objects support
basic CRUD operations on a relational (SQL) database: insert
,
select
, update
, and delete
.
Dao
objects are created by using a DaoBuilder
or
IndirectDaoBuilder
. These classes
provide a simple, declarative, fluent interface for describing the relationship between
the Java object to be persisted and the underlying schema that supports it.
While almost all the classes and methods in this package are public, there is little need to
use them directly. Other than the DaoBuilder
, IndirectDaoBuilder
,
Dao
, Converter
, Transactor
and HrormException
most clients should not have to directly reference anything in this package.
Hrorm intentionally converts all checked SQLException
instances that arise to
HrormException
which extends RuntimeException
in its
client interfaces. Of course,
proper exception handling is essential to a sound persistence policy in an application,
regardless of whether the particular exceptions are checked or unchecked.
Copyright © 2018. All rights reserved.