code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
@Override public Object convertQueryResult( final EnversService enversService, final EntityInstantiator entityInstantiator, final String entityName, final Number revision, final Object value) { final Object result; if ( enversService.getEntitiesConfigurations().isVersioned( entityName ) ) { resul...
@author Felix Feisst (feisst dot felix at gmail dot com) @author Chris Cranford
convertQueryResult
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/query/projection/internal/EntityAuditProjection.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/query/projection/internal/EntityAuditProjection.java
Apache-2.0
@Override public String getAlias(String baseAlias) { return alias == null ? baseAlias : alias; }
@author Adam Warski (adam at warski dot org) @author Chris Cranford
getAlias
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/query/projection/internal/PropertyAuditProjection.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/query/projection/internal/PropertyAuditProjection.java
Apache-2.0
@Override public void addProjectionToQuery( EnversService enversService, AuditReaderImplementor auditReader, Map<String, String> aliasToEntityNameMap, Map<String, String> aliasToComponentPropertyNameMap, String baseAlias, QueryBuilder queryBuilder) { String projectionEntityAlias = getAlias( baseAli...
@author Adam Warski (adam at warski dot org) @author Chris Cranford
addProjectionToQuery
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/query/projection/internal/PropertyAuditProjection.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/query/projection/internal/PropertyAuditProjection.java
Apache-2.0
@Override public Object convertQueryResult( EnversService enversService, EntityInstantiator entityInstantiator, String entityName, Number revision, Object value) { return value; }
@author Adam Warski (adam at warski dot org) @author Chris Cranford
convertQueryResult
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/query/projection/internal/PropertyAuditProjection.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/query/projection/internal/PropertyAuditProjection.java
Apache-2.0
@Deprecated(since = "5.2.1") default void perform( Session session, String entityName, EnversService enversService, Object id, Object data, Object revision) { perform( session, entityName, enversService.getConfig(), id, data, revision ); }
Perform the persistence of audited data for regular entities. @param session Session, which can be used to persist the data. @param entityName Name of the entity, in which the audited change happens @param enversService The EnversService @param id Id of the entity. @param data Audit data to persist @param revision Cur...
perform
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/AuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/AuditStrategy.java
Apache-2.0
@Deprecated(since = "5.2.1") default void performCollectionChange( Session session, String entityName, String propertyName, EnversService enversService, PersistentCollectionChangeData persistentCollectionChangeData, Object revision) { performCollectionChange( session, entityName, proper...
Perform the persistence of audited data for collection ("middle") entities. @param session Session, which can be used to persist the data. @param entityName Name of the entity, in which the audited change happens. @param propertyName The name of the property holding the persistent collection @param enversService The E...
performCollectionChange
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/AuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/AuditStrategy.java
Apache-2.0
@Override public void perform( Session session, String entityName, Configuration configuration, Object id, Object data, Object revision) { session.persist( configuration.getAuditEntityName( entityName ), data ); sessionCacheCleaner.scheduleAuditDataRemoval( session, data ); }
Default implementation of the {@link org.hibernate.envers.strategy.spi.AuditStrategy} contract. <p> This strategy handles the persistence of audit entity data in a very simplistic way. @author Adam Warski @author Stephanie Pau @author Chris Cranford
perform
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/DefaultAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/DefaultAuditStrategy.java
Apache-2.0
@Override public void performCollectionChange( Session session, String entityName, String propertyName, Configuration configuration, PersistentCollectionChangeData persistentCollectionChangeData, Object revision) { session.persist( persistentCollectionChangeData.getEntityName(), persistentCollectio...
Default implementation of the {@link org.hibernate.envers.strategy.spi.AuditStrategy} contract. <p> This strategy handles the persistence of audit entity data in a very simplistic way. @author Adam Warski @author Stephanie Pau @author Chris Cranford
performCollectionChange
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/DefaultAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/DefaultAuditStrategy.java
Apache-2.0
@Override public void addEntityAtRevisionRestriction( Configuration configuration, QueryBuilder rootQueryBuilder, Parameters parameters, String revisionProperty, String revisionEndProperty, boolean addAlias, MiddleIdData idData, String revisionPropertyPath, String originalIdPropertyName, ...
{@inheritDoc} For this implementation, a subquery is used <p> {@code e.revision = (SELECT max(...) ...}
addEntityAtRevisionRestriction
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/DefaultAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/DefaultAuditStrategy.java
Apache-2.0
@Override public void addAssociationAtRevisionRestriction( QueryBuilder rootQueryBuilder, Parameters parameters, String revisionProperty, String revisionEndProperty, boolean addAlias, MiddleIdData referencingIdData, String versionsMiddleEntityName, String eeOriginalIdPropertyPath, String rev...
{@inheritDoc} For this implmeentation, the a subquery is used <p> {@code e.revision = (SELECT max(...) ...}
addAssociationAtRevisionRestriction
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/DefaultAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/DefaultAuditStrategy.java
Apache-2.0
@Override public void postInitialize(AuditStrategyContext context) { setRevisionTimestampGetter( context.getRevisionInfoTimestampAccessor() ); }
getter for the revision entity field annotated with @RevisionTimestamp
postInitialize
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
@Override public void addAdditionalColumns(MappingContext mappingContext) { if ( !mappingContext.isRevisionEndTimestampOnly() ) { // Add revision end field since mapping is not requesting only the timestamp. final ManyToOneAttribute revEndMapping = new ManyToOneAttribute( mappingContext.getConfiguration()...
getter for the revision entity field annotated with @RevisionTimestamp
addAdditionalColumns
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
@Override public void perform( final Session session, final String entityName, final Configuration configuration, final Object id, final Object data, final Object revision) { final String auditedEntityName = configuration.getAuditEntityName( entityName ); // Save the audit data session.persist...
getter for the revision entity field annotated with @RevisionTimestamp
perform
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
@Override @SuppressWarnings("unchecked") public void performCollectionChange( Session session, String entityName, String propertyName, Configuration configuration, PersistentCollectionChangeData persistentCollectionChangeData, Object revision) { final QueryBuilder qb = new QueryBuilder( persisten...
getter for the revision entity field annotated with @RevisionTimestamp
performCollectionChange
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
@Override public void addEntityAtRevisionRestriction( Configuration configuration, QueryBuilder rootQueryBuilder, Parameters parameters, String revisionProperty, String revisionEndProperty, boolean addAlias, MiddleIdData idData, String revisionPropertyPath, String originalIdPropertyName, ...
{@inheritDoc} For this implmenetation, the revision-end column is used <p> {@code e.revision <= :revision and (e.endRevision > :revision or e.endRevision is null}
addEntityAtRevisionRestriction
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
@Override public void addAssociationAtRevisionRestriction( QueryBuilder rootQueryBuilder, Parameters parameters, String revisionProperty, String revisionEndProperty, boolean addAlias, MiddleIdData referencingIdData, String versionsMiddleEntityName, String eeOriginalIdPropertyPath, String rev...
{@inheritDoc} For this implmenetation, the revision-end column is used <p> {@code e.revision <= :revision and (e.endRevision > :revision or e.endRevision is null}
addAssociationAtRevisionRestriction
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
private int executeUpdate(SessionImplementor session, UpdateContext context) { final String sql = context.toStatementString(); final JdbcCoordinator jdbcCoordinator = session.getJdbcCoordinator(); final PreparedStatement statement = jdbcCoordinator.getStatementPreparer().prepareStatement( sql ); return session...
Executes the {@link UpdateContext} within the scope of the specified session. @param session the session @param context the update context to be executed @return the number of rows affected by the operation
executeUpdate
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
private List<UpdateContext> getUpdateContexts( String entityName, String auditEntityName, SessionImplementor session, Configuration configuration, Object id, Object revision) { EntityPersister entity = getEntityPersister( entityName, session ); final List<UpdateContext> contexts = new ArrayList<>...
Executes the {@link UpdateContext} within the scope of the specified session. @param session the session @param context the update context to be executed @return the number of rows affected by the operation
getUpdateContexts
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
private UpdateContext getUpdateContext( String entityName, String auditEntityName, SessionImplementor session, Configuration configuration, Object id, Object revision) { final EntityPersister entity = getEntityPersister( entityName, session ); final EntityPersister rootEntity = getEntityPersister...
Executes the {@link UpdateContext} within the scope of the specified session. @param session the session @param context the update context to be executed @return the number of rows affected by the operation
getUpdateContext
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
private UpdateContext getNonRootUpdateContext( String entityName, String auditEntityName, SessionImplementor session, Configuration configuration, Object id, Object revision) { final EntityPersister entity = getEntityPersister( entityName, session ); final EntityPersister auditEntity = getEntityP...
Creates the update context used to modify the revision end timestamp values for a non-root entity. This is only used to set the revision end timestamp for joined inheritance non-root entity mappings. @param entityName the entity name @param auditEntityName the audited entity name @param session the session @param conf...
getNonRootUpdateContext
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
private Number getRevisionNumber(Configuration configuration, Object revisionEntity) { final RevisionInfoNumberReader reader = configuration.getRevisionInfo().getRevisionInfoNumberReader(); return reader.getRevisionNumber( revisionEntity ); }
Creates the update context used to modify the revision end timestamp values for a non-root entity. This is only used to set the revision end timestamp for joined inheritance non-root entity mappings. @param entityName the entity name @param auditEntityName the audited entity name @param session the session @param conf...
getRevisionNumber
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
private String getUpdateTableName(EntityPersister rootEntity, EntityPersister rootAuditEntity, EntityPersister auditEntity) { if ( rootEntity instanceof UnionSubclassEntityPersister ) { // we need to specially handle union-subclass mappings return auditEntity.getMappedTableDetails().getTableName(); } return...
Creates the update context used to modify the revision end timestamp values for a non-root entity. This is only used to set the revision end timestamp for joined inheritance non-root entity mappings. @param entityName the entity name @param auditEntityName the audited entity name @param session the session @param conf...
getUpdateTableName
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
public List<QueryParameterBinding> getBindings() { return bindings; }
An {@link Update} that can also track parameter bindings.
getBindings
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
public void bind(Object value, Type type) { bindings.add( new QueryParameterBindingType( value, type ) ); }
An {@link Update} that can also track parameter bindings.
bind
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
public void bind(Object value, ModelPart part) { bindings.add( new QueryParameterBindingPart( value, part ) ); }
An {@link Update} that can also track parameter bindings.
bind
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
public int bind(int index, PreparedStatement statement, SessionImplementor session) throws SQLException { type.nullSafeSet( statement, value, index, session ); return type.getColumnSpan( session.getSessionFactory().getRuntimeMetamodels() ); }
An {@link Update} that can also track parameter bindings.
bind
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
@Override public int bind( int index, PreparedStatement statement, SessionImplementor session) { try { return modelPart.breakDownJdbcValues( value, index, statement, session, (valueIndex, preparedStatement, sessionImplementor, jdbcValue, jdbcValueMapping) -> { t...
An {@link Update} that can also track parameter bindings.
bind
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
Apache-2.0
default void addAdditionalColumns(MappingContext mappingContext) { // Made default for backward compatibility. // Remove default method in 6.0. }
Add additional columns to the audit mappings. @param mappingContext The mapping context.
addAdditionalColumns
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/AuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/AuditStrategy.java
Apache-2.0
default void postInitialize(AuditStrategyContext context) { // Made default for backward compatibility. // Remove default method in 6.0. }
Performs post initialization of the audit strategy implementation. @param context the audit strategy context, never {@code null}
postInitialize
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/AuditStrategy.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/AuditStrategy.java
Apache-2.0
public PersistentEntity getEntityMapping() { return mapping; }
Describes an audit mapping context. @author Chris Cranford
getEntityMapping
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/MappingContext.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/MappingContext.java
Apache-2.0
public Configuration getConfiguration() { return configuration; }
Describes an audit mapping context. @author Chris Cranford
getConfiguration
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/MappingContext.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/MappingContext.java
Apache-2.0
public String getRevisionInfoPropertyType() { return revisionInfoPropertyType; }
Describes an audit mapping context. @author Chris Cranford
getRevisionInfoPropertyType
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/MappingContext.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/MappingContext.java
Apache-2.0
public String getRevisionInfoExplicitTypeName() { return revisionInfoExplicitTypeName; }
Describes an audit mapping context. @author Chris Cranford
getRevisionInfoExplicitTypeName
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/MappingContext.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/MappingContext.java
Apache-2.0
public boolean isRevisionEndTimestampOnly() { return revisionEndTimestampOnly; }
Describes an audit mapping context. @author Chris Cranford
isRevisionEndTimestampOnly
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/MappingContext.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/strategy/spi/MappingContext.java
Apache-2.0
public T1 getFirst() { return obj1; }
A pair of objects. @param <T1> @param <T2> @author Adam Warski (adamw@aster.pl)
getFirst
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/tools/Pair.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/tools/Pair.java
Apache-2.0
public T2 getSecond() { return obj2; }
A pair of objects. @param <T1> @param <T2> @author Adam Warski (adamw@aster.pl)
getSecond
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/tools/Pair.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/tools/Pair.java
Apache-2.0
@Override public boolean equals(Object o) { if ( this == o ) { return true; } if ( !(o instanceof Pair) ) { return false; } final Pair pair = (Pair) o; if ( obj1 != null ? !obj1.equals( pair.obj1 ) : pair.obj1 != null ) { return false; } if ( obj2 != null ? !obj2.equals( pair.obj2 ) : pair.o...
A pair of objects. @param <T1> @param <T2> @author Adam Warski (adamw@aster.pl)
equals
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/tools/Pair.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/tools/Pair.java
Apache-2.0
@Override public int hashCode() { int result; result = (obj1 != null ? obj1.hashCode() : 0); result = 31 * result + (obj2 != null ? obj2.hashCode() : 0); return result; }
A pair of objects. @param <T1> @param <T2> @author Adam Warski (adamw@aster.pl)
hashCode
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/tools/Pair.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/tools/Pair.java
Apache-2.0
public static <T1, T2> Pair<T1, T2> make(T1 obj1, T2 obj2) { return new Pair<>( obj1, obj2 ); }
A pair of objects. @param <T1> @param <T2> @author Adam Warski (adamw@aster.pl)
make
java
hibernate/hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/tools/Pair.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/main/java/org/hibernate/envers/tools/Pair.java
Apache-2.0
@Override public boolean equals(Object o) { if ( this == o ) { return true; } if ( !(o instanceof Child) ) { return false; } Child that = (Child) o; if ( data != null ? !data.equals( that.data ) : that.data != null ) { return false; } if ( id != null ? !id.equals( that.id ) : that.id != null...
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
equals
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Child.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Child.java
Apache-2.0
@Override public int hashCode() { int result = id != null ? id.hashCode() : 0; result = 31 * result + (data != null ? data.hashCode() : 0); return result; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
hashCode
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Child.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Child.java
Apache-2.0
@Override public String toString() { return "Child(id = " + id + ", data = " + data + ")"; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
toString
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Child.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Child.java
Apache-2.0
public Long getId() { return id; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
getId
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Child.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Child.java
Apache-2.0
public void setId(Long id) { this.id = id; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
setId
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Child.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Child.java
Apache-2.0
public String getData() { return data; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
getData
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Child.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Child.java
Apache-2.0
public void setData(String data) { this.data = data; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
setData
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Child.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Child.java
Apache-2.0
@Override public boolean equals(Object o) { if ( this == o ) { return true; } if ( !(o instanceof Parent) ) { return false; } Parent that = (Parent) o; if ( data != null ? !data.equals( that.data ) : that.data != null ) { return false; } if ( id != null ? !id.equals( that.id ) : that.id != n...
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
equals
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
Apache-2.0
@Override public int hashCode() { int result = id != null ? id.hashCode() : 0; result = 31 * result + (data != null ? data.hashCode() : 0); return result; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
hashCode
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
Apache-2.0
@Override public String toString() { return "Parent(id = " + id + ", data = " + data + ")"; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
toString
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
Apache-2.0
public Long getId() { return id; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
getId
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
Apache-2.0
public void setId(Long id) { this.id = id; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
setId
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
Apache-2.0
public String getData() { return data; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
getData
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
Apache-2.0
public void setData(String data) { this.data = data; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
setData
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
Apache-2.0
public Set<Child> getCollection() { return collection; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
getCollection
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
Apache-2.0
public void setCollection(Set<Child> collection) { this.collection = collection; }
@author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
setCollection
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/ee/estonia/entities/Parent.java
Apache-2.0
public Class<T> getEnumClass() { return enumClass; }
Value type mapper for enumerations. @author Emmanuel Bernard @author Hardy Ferentschik @author Steve Ebersole @deprecated Use the built-in support for enums
getEnumClass
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public void setParameterValues(Properties parameters) { // IMPL NOTE: we handle 2 distinct cases here: // 1) we are passed a ParameterType instance in the incoming Properties - generally // speaking this indicates the annotation-binding case, and the passed ParameterType // represents informati...
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
setParameterValues
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
private jakarta.persistence.EnumType getEnumType(ParameterType reader) { if ( reader != null ) { if ( reader.isPrimaryKey() ) { final MapKeyEnumerated enumAnn = getAnnotation( reader.getAnnotationsMethod(), MapKeyEnumerated.class ); if ( enumAnn != null ) { return enumAnn.value(); } } final ...
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
getEnumType
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
private boolean isNationalized(ParameterType reader) { return typeConfiguration.getCurrentBaseSqlTypeIndicators().isNationalized() || reader!=null && getAnnotation( reader.getAnnotationsMethod(), Nationalized.class ) != null; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
isNationalized
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@SuppressWarnings("unchecked") private <A extends Annotation> A getAnnotation(Annotation[] annotations, Class<A> annotationType) { for ( Annotation annotation : annotations ) { if ( annotationType.isInstance( annotation ) ) { return (A) annotation; } } return null; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
getAnnotation
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public int getSqlType() { verifyConfigured(); return jdbcType.getJdbcTypeCode(); }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
getSqlType
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public Class<T> returnedClass() { return enumClass; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
returnedClass
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public boolean equals(T x, T y) throws HibernateException { return x == y; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
equals
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public int hashCode(T x) throws HibernateException { return x == null ? 0 : x.hashCode(); }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
hashCode
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public T nullSafeGet(ResultSet rs, int position, WrapperOptions options) throws SQLException { verifyConfigured(); return jdbcType.getExtractor( enumJavaType ).extract( rs, position, options ); }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
nullSafeGet
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
private void verifyConfigured() { if ( enumJavaType == null ) { throw new AssertionFailure("EnumType (" + enumClass.getName() + ") not properly, fully configured"); } }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
verifyConfigured
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public void nullSafeSet(PreparedStatement st, T value, int index, WrapperOptions options) throws SQLException { verifyConfigured(); jdbcType.getBinder( enumJavaType ).bind( st, value, index, options ); }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
nullSafeSet
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public T deepCopy(T value) throws HibernateException { return value; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
deepCopy
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public boolean isMutable() { return false; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
isMutable
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public Serializable disassemble(T value) throws HibernateException { return value; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
disassemble
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public T assemble(Serializable cached, Object owner) throws HibernateException { return (T) cached; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
assemble
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public T replace(T original, T target, Object owner) throws HibernateException { return original; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
replace
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public TypeConfiguration getTypeConfiguration() { return typeConfiguration; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
getTypeConfiguration
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public void setTypeConfiguration(TypeConfiguration typeConfiguration) { this.typeConfiguration = typeConfiguration; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
setTypeConfiguration
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public String toSqlLiteral(T value) { verifyConfigured(); return isOrdinal() ? Integer.toString( value.ordinal() ) : "'" + value.name() + "'"; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
toSqlLiteral
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public String toString(T value) { verifyConfigured(); return enumJavaType.toName( value ); }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
toString
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public T fromStringValue(CharSequence sequence) { verifyConfigured(); return enumJavaType.fromName( sequence.toString() ); }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
fromStringValue
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override @SuppressWarnings("unchecked") public String toLoggableString(Object value, SessionFactoryImplementor factory) { verifyConfigured(); return enumJavaType.extractLoggableRepresentation( (T) value ); }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
toLoggableString
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
public boolean isOrdinal() { verifyConfigured(); return isOrdinal; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
isOrdinal
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public TypeConfiguration getTypeConfiguration() { return typeConfiguration; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
getTypeConfiguration
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public jakarta.persistence.EnumType getEnumeratedType() { return enumType != null ? enumType : typeConfiguration.getCurrentBaseSqlTypeIndicators().getEnumeratedType(); }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
getEnumeratedType
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public boolean isNationalized() { return nationalized; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
isNationalized
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public long getColumnLength() { return columnLength == null ? NO_COLUMN_LENGTH : columnLength; }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
getColumnLength
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
@Override public Dialect getDialect() { return typeConfiguration.getCurrentBaseSqlTypeIndicators().getDialect(); }
<p> An instance of this class is "configured" by a call to {@link #setParameterValues}, where configuration parameters are given as entries in a {@link Properties} object. There are two distinct ways an instance may be configured: <ul> <li>one for {@code hbm.xml}-based mapping, and <li>another for annotation-based or {...
getDialect
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/EnumType.java
Apache-2.0
public Integer getId() { return id; }
Tests that a custom type which extends {@link org.hibernate.envers.test.integration.customtype.EnumType} continues to be recognized as an EnumType rather than a basic custom type implementation since the values which envers sends to describe the type in HBM differ whether its an Enum or not. Without the fix, this test...
getId
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
Apache-2.0
public void setId(Integer id) { this.id = id; }
Tests that a custom type which extends {@link org.hibernate.envers.test.integration.customtype.EnumType} continues to be recognized as an EnumType rather than a basic custom type implementation since the values which envers sends to describe the type in HBM differ whether its an Enum or not. Without the fix, this test...
setId
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
Apache-2.0
public Status getStatus() { return status; }
Tests that a custom type which extends {@link org.hibernate.envers.test.integration.customtype.EnumType} continues to be recognized as an EnumType rather than a basic custom type implementation since the values which envers sends to describe the type in HBM differ whether its an Enum or not. Without the fix, this test...
getStatus
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
Apache-2.0
public void setStatus(Status status) { this.status = status; }
Tests that a custom type which extends {@link org.hibernate.envers.test.integration.customtype.EnumType} continues to be recognized as an EnumType rather than a basic custom type implementation since the values which envers sends to describe the type in HBM differ whether its an Enum or not. Without the fix, this test...
setStatus
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
Apache-2.0
public Status getStatus2() { return status2; }
Tests that a custom type which extends {@link org.hibernate.envers.test.integration.customtype.EnumType} continues to be recognized as an EnumType rather than a basic custom type implementation since the values which envers sends to describe the type in HBM differ whether its an Enum or not. Without the fix, this test...
getStatus2
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
Apache-2.0
public void setStatus2(Status status2) { this.status2 = status2; }
Tests that a custom type which extends {@link org.hibernate.envers.test.integration.customtype.EnumType} continues to be recognized as an EnumType rather than a basic custom type implementation since the values which envers sends to describe the type in HBM differ whether its an Enum or not. Without the fix, this test...
setStatus2
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
Apache-2.0
@Override protected Class<?>[] getAnnotatedClasses() { return new Class<?>[] { Widget.class }; }
Tests that a custom type which extends {@link org.hibernate.envers.test.integration.customtype.EnumType} continues to be recognized as an EnumType rather than a basic custom type implementation since the values which envers sends to describe the type in HBM differ whether its an Enum or not. Without the fix, this test...
getAnnotatedClasses
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
Apache-2.0
@Test @Priority(10) public void initData() { // Revision 1 - insert this.widgetId = doInJPA( this::entityManagerFactory, entityManager -> { final Widget widget = new Widget( Widget.Status.DRAFT ); entityManager.persist( widget ); return widget.getId(); } ); // Revision 2 - update doInJPA( this::en...
Tests that a custom type which extends {@link org.hibernate.envers.test.integration.customtype.EnumType} continues to be recognized as an EnumType rather than a basic custom type implementation since the values which envers sends to describe the type in HBM differ whether its an Enum or not. Without the fix, this test...
initData
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
Apache-2.0
@Test public void testRevisionHistory() { List revisions = getAuditReader().getRevisions( Widget.class, this.widgetId ); assertEquals( Arrays.asList( 1, 2, 3 ), revisions ); final Widget rev1 = getAuditReader().find( Widget.class, this.widgetId, 1 ); assertEquals( Widget.Status.DRAFT, rev1.getStatus() ); f...
Tests that a custom type which extends {@link org.hibernate.envers.test.integration.customtype.EnumType} continues to be recognized as an EnumType rather than a basic custom type implementation since the values which envers sends to describe the type in HBM differ whether its an Enum or not. Without the fix, this test...
testRevisionHistory
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
Apache-2.0
@Test public void testEnumPropertyStorageType() { // test that property 'status' translates to an enum type that is stored by name (e.g. STRING) assertEnumProperty( Widget.class, ExtendedEnumType.class, "status", EnumType.STRING ); // test that property 'status2' translates to an enum type that is stored by pos...
Tests that a custom type which extends {@link org.hibernate.envers.test.integration.customtype.EnumType} continues to be recognized as an EnumType rather than a basic custom type implementation since the values which envers sends to describe the type in HBM differ whether its an Enum or not. Without the fix, this test...
testEnumPropertyStorageType
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
Apache-2.0
private void assertEnumProperty(Class<?> entityClass, Class<?> typeClass, String propertyName, EnumType expectedType) { doInJPA( this::entityManagerFactory, entityManager -> { final SessionFactoryImplementor sessionFactory = entityManager.unwrap( SessionImplementor.class ).getSessionFactory(); final EntityPers...
Tests that a custom type which extends {@link org.hibernate.envers.test.integration.customtype.EnumType} continues to be recognized as an EnumType rather than a basic custom type implementation since the values which envers sends to describe the type in HBM differ whether its an Enum or not. Without the fix, this test...
assertEnumProperty
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ExtendedEnumTypeTest.java
Apache-2.0
@Override public Object getPropertyValue(Object component, int property) throws HibernateException { return switch ( property ) { case 0 -> component; case 1 -> component.getClass().getName(); default -> null; }; }
Custom type used to persist binary representation of Java object in the database. Spans over two columns - one storing text representation of Java class name and the second one containing binary data. @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
getPropertyValue
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ObjectUserType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ObjectUserType.java
Apache-2.0
@Override public Object instantiate(ValueAccess valueAccess) { return valueAccess.getValue( 0, Object.class ); }
Custom type used to persist binary representation of Java object in the database. Spans over two columns - one storing text representation of Java class name and the second one containing binary data. @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
instantiate
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ObjectUserType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ObjectUserType.java
Apache-2.0
@Override public Class<?> embeddable() { return TaggedObject.class; }
Custom type used to persist binary representation of Java object in the database. Spans over two columns - one storing text representation of Java class name and the second one containing binary data. @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
embeddable
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ObjectUserType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ObjectUserType.java
Apache-2.0
@Override public Class<Object> returnedClass() { return Object.class; }
Custom type used to persist binary representation of Java object in the database. Spans over two columns - one storing text representation of Java class name and the second one containing binary data. @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
returnedClass
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ObjectUserType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ObjectUserType.java
Apache-2.0
@Override public boolean equals(Object x, Object y) throws HibernateException { if ( x == y ) { return true; } if ( x == null || y == null ) { return false; } return x.equals( y ); }
Custom type used to persist binary representation of Java object in the database. Spans over two columns - one storing text representation of Java class name and the second one containing binary data. @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
equals
java
hibernate/hibernate-orm
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ObjectUserType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/customtype/ObjectUserType.java
Apache-2.0