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
@AfterEach public void dropTestData(SessionFactoryScope scope) { scope.inTransaction( (session) -> session.createQuery( "delete TheEntity" ).executeUpdate() ); }
Test for {@link CollectionPropertyHolder}. Tests that {@link jakarta.persistence.AttributeConverter}s are considered correctly for {@link jakarta.persistence.ElementCollection}. @author Markus Heiden @author Steve Ebersole
dropTestData
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/elementCollection/ElementCollectionTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/elementCollection/ElementCollectionTests.java
Apache-2.0
@Test @JiraKey(value = "HHH-8804") public void testGenericTypeParameters() { final BootstrapContextImpl bootstrapContext = new BootstrapContextImpl(); try { final ConverterDescriptor<List<String>, Integer> converterDescriptor = ConverterDescriptors.of( CustomAttributeConverter.class, bootstrapConte...
Test the ability to interpret and understand AttributeConverter impls which use parameterized types as one of (typically the "attribute type") its parameter types. @author Svein Baardsen @author Steve Ebersole
testGenericTypeParameters
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
Apache-2.0
@Test @JiraKey( value = "HHH-10050" ) public void testNestedTypeParameterAutoApplication(ServiceRegistryScope scope) { final Metadata metadata = new MetadataSources( scope.getRegistry() ) .addAnnotatedClass( SampleEntity.class ) .getMetadataBuilder() .applyAttributeConverter( IntegerListConverter.class ...
Test the ability to interpret and understand AttributeConverter impls which use parameterized types as one of (typically the "attribute type") its parameter types. @author Svein Baardsen @author Steve Ebersole
testNestedTypeParameterAutoApplication
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
Apache-2.0
@Override public String convertToDatabaseColumn(List<Integer> attribute) { if ( attribute == null || attribute.isEmpty() ) { return null; } else { return StringHelper.join( ", ", attribute.iterator() ); } }
Test the ability to interpret and understand AttributeConverter impls which use parameterized types as one of (typically the "attribute type") its parameter types. @author Svein Baardsen @author Steve Ebersole
convertToDatabaseColumn
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
Apache-2.0
@Override public List<Integer> convertToEntityAttribute(String dbData) { if ( dbData == null ) { return null; } dbData = dbData.trim(); if ( dbData.length() == 0 ) { return null; } final List<Integer> integers = new ArrayList<Integer>(); final StringTokenizer tokens = new StringTokenize...
Test the ability to interpret and understand AttributeConverter impls which use parameterized types as one of (typically the "attribute type") its parameter types. @author Svein Baardsen @author Steve Ebersole
convertToEntityAttribute
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
Apache-2.0
@Override public String convertToDatabaseColumn(List<String> attribute) { if ( attribute == null || attribute.isEmpty() ) { return null; } else { return String.join( ", ", attribute ); } }
Test the ability to interpret and understand AttributeConverter impls which use parameterized types as one of (typically the "attribute type") its parameter types. @author Svein Baardsen @author Steve Ebersole
convertToDatabaseColumn
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
Apache-2.0
@Override public List<String> convertToEntityAttribute(String dbData) { if ( dbData == null ) { return null; } dbData = dbData.trim(); if ( dbData.length() == 0 ) { return null; } final List<String> strings = new ArrayList<String>(); final StringTokenizer tokens = new StringTokenizer( d...
Test the ability to interpret and understand AttributeConverter impls which use parameterized types as one of (typically the "attribute type") its parameter types. @author Svein Baardsen @author Steve Ebersole
convertToEntityAttribute
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
Apache-2.0
@Override public Integer convertToDatabaseColumn(List<String> attribute) { return attribute.size(); }
Test the ability to interpret and understand AttributeConverter impls which use parameterized types as one of (typically the "attribute type") its parameter types. @author Svein Baardsen @author Steve Ebersole
convertToDatabaseColumn
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
Apache-2.0
@Override public List<String> convertToEntityAttribute(Integer dbData) { return new ArrayList<String>(dbData); }
Test the ability to interpret and understand AttributeConverter impls which use parameterized types as one of (typically the "attribute type") its parameter types. @author Svein Baardsen @author Steve Ebersole
convertToEntityAttribute
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/generics/ParameterizedAttributeConverterParameterTypeTest.java
Apache-2.0
@Test public void testIntegerWrapper(SessionFactoryScope scope) { final EntityConverter created = scope.fromTransaction( (session) -> { EntityConverter entity = new EntityConverter(); entity.setIntegerWrapper( new IntegerWrapper( 10 ) ); session.persist( entity ); return entity; } ); ...
@author Janario Oliveira @author Steve Ebersole
testIntegerWrapper
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Test public void testIntegerWrapperThrowsException(SessionFactoryScope scope) { final EntityConverter created = scope.fromTransaction( (session) -> { EntityConverter entity = new EntityConverter(); entity.setIntegerWrapper( new IntegerWrapper( 10 ) ); session.persist( entity ); return entit...
@author Janario Oliveira @author Steve Ebersole
testIntegerWrapperThrowsException
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Test public void testStringWrapper(SessionFactoryScope scope) { final EntityConverter created = scope.fromTransaction( (session) -> { EntityConverter entity = new EntityConverter(); entity.setStringWrapper( new StringWrapper( "TEN" ) ); session.persist( entity ); return entity; } ); ...
@author Janario Oliveira @author Steve Ebersole
testStringWrapper
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Test public void testSameTypeConverter(SessionFactoryScope scope) { final EntityConverter created = scope.fromTransaction( (session) -> { EntityConverter entity = new EntityConverter(); entity.setSameTypeConverter( "HUNDRED" ); session.persist( entity ); return entity; } ); final E...
@author Janario Oliveira @author Steve Ebersole
testSameTypeConverter
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Test public void testEnumOrdinal(SessionFactoryScope scope) { final EntityConverter created = scope.fromTransaction( (session) -> { EntityConverter entity = new EntityConverter(); entity.setLetterOrdinal( Letter.B ); session.persist( entity ); return entity; } ); final EntityConver...
@author Janario Oliveira @author Steve Ebersole
testEnumOrdinal
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Test public void testEnumString(SessionFactoryScope scope) { final EntityConverter created = scope.fromTransaction( (session) -> { EntityConverter entity = new EntityConverter(); entity.setLetterString( Letter.C ); session.persist( entity ); return entity; } ); final EntityConverte...
@author Janario Oliveira @author Steve Ebersole
testEnumString
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Test public void testNumberImplicit(SessionFactoryScope scope) { final EntityConverter created = scope.fromTransaction( (session) -> { EntityConverter entity = new EntityConverter(); entity.setNumbersImplicit( Numbers.THREE ); session.persist( entity ); return entity; } ); final En...
@author Janario Oliveira @author Steve Ebersole
testNumberImplicit
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Test public void testNumberImplicitOverridden(SessionFactoryScope scope) { final EntityConverter created = scope.fromTransaction( (session) -> { EntityConverter entity = new EntityConverter(); entity.setNumbersImplicitOverridden( Numbers.TWO ); session.persist( entity ); return entity; ...
@author Janario Oliveira @author Steve Ebersole
testNumberImplicitOverridden
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
private EntityConverter find(int id, String queryLiteral, SessionImplementor session) { final String qryBase = "select e from EntityConverter e where e.id=:id and "; final Query<EntityConverter> query = session.createQuery(qryBase + queryLiteral, EntityConverter.class ); query.setParameter( "id", id ); return q...
@author Janario Oliveira @author Steve Ebersole
find
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@AfterEach public void dropTestData(SessionFactoryScope scope) { scope.inTransaction( (session) -> session.createQuery( "delete EntityConverter" ).executeUpdate() ); }
@author Janario Oliveira @author Steve Ebersole
dropTestData
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Override public Integer convertToDatabaseColumn(Numbers attribute) { return attribute == null ? null : attribute.ordinal() + 1; }
@author Janario Oliveira @author Steve Ebersole
convertToDatabaseColumn
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Override public Numbers convertToEntityAttribute(Integer dbData) { return dbData == null ? null : Numbers.values()[dbData - 1]; }
@author Janario Oliveira @author Steve Ebersole
convertToEntityAttribute
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Override public String convertToDatabaseColumn(Numbers attribute) { return attribute == null ? null : Integer.toString( attribute.ordinal() + 1 ); }
@author Janario Oliveira @author Steve Ebersole
convertToDatabaseColumn
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Override public Numbers convertToEntityAttribute(String dbData) { return dbData == null ? null : Numbers.values()[Integer.parseInt( dbData ) - 1]; }
@author Janario Oliveira @author Steve Ebersole
convertToEntityAttribute
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Override public Integer convertToDatabaseColumn(IntegerWrapper attribute) { return attribute == null ? null : attribute.getValue(); }
@author Janario Oliveira @author Steve Ebersole
convertToDatabaseColumn
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Override public IntegerWrapper convertToEntityAttribute(Integer dbData) { return dbData == null ? null : new IntegerWrapper( dbData ); }
@author Janario Oliveira @author Steve Ebersole
convertToEntityAttribute
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Override public String convertToDatabaseColumn(StringWrapper attribute) { return attribute == null ? null : attribute.getValue(); }
@author Janario Oliveira @author Steve Ebersole
convertToDatabaseColumn
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Override public StringWrapper convertToEntityAttribute(String dbData) { return dbData == null ? null : new StringWrapper( dbData ); }
@author Janario Oliveira @author Steve Ebersole
convertToEntityAttribute
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Override public String convertToDatabaseColumn(String attribute) { return attribute == null ? null : "VALUE_" + attribute; }
@author Janario Oliveira @author Steve Ebersole
convertToDatabaseColumn
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Override public String convertToEntityAttribute(String dbData) { return dbData == null ? null : dbData.substring( 6 ); }
@author Janario Oliveira @author Steve Ebersole
convertToEntityAttribute
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public Integer getId() { return id; }
@author Janario Oliveira @author Steve Ebersole
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public Letter getLetterOrdinal() { return letterOrdinal; }
@author Janario Oliveira @author Steve Ebersole
getLetterOrdinal
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public void setLetterOrdinal(Letter letterOrdinal) { this.letterOrdinal = letterOrdinal; }
@author Janario Oliveira @author Steve Ebersole
setLetterOrdinal
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public Letter getLetterString() { return letterString; }
@author Janario Oliveira @author Steve Ebersole
getLetterString
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public void setLetterString(Letter letterString) { this.letterString = letterString; }
@author Janario Oliveira @author Steve Ebersole
setLetterString
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public Numbers getNumbersImplicit() { return numbersImplicit; }
@author Janario Oliveira @author Steve Ebersole
getNumbersImplicit
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public void setNumbersImplicit(Numbers numbersImplicit) { this.numbersImplicit = numbersImplicit; }
@author Janario Oliveira @author Steve Ebersole
setNumbersImplicit
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public Numbers getNumbersImplicitOverridden() { return numbersImplicitOverridden; }
@author Janario Oliveira @author Steve Ebersole
getNumbersImplicitOverridden
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public void setNumbersImplicitOverridden(Numbers numbersImplicitOverridden) { this.numbersImplicitOverridden = numbersImplicitOverridden; }
@author Janario Oliveira @author Steve Ebersole
setNumbersImplicitOverridden
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public IntegerWrapper getIntegerWrapper() { return integerWrapper; }
@author Janario Oliveira @author Steve Ebersole
getIntegerWrapper
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public void setIntegerWrapper(IntegerWrapper integerWrapper) { this.integerWrapper = integerWrapper; }
@author Janario Oliveira @author Steve Ebersole
setIntegerWrapper
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public StringWrapper getStringWrapper() { return stringWrapper; }
@author Janario Oliveira @author Steve Ebersole
getStringWrapper
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public void setStringWrapper(StringWrapper stringWrapper) { this.stringWrapper = stringWrapper; }
@author Janario Oliveira @author Steve Ebersole
setStringWrapper
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public String getSameTypeConverter() { return sameTypeConverter; }
@author Janario Oliveira @author Steve Ebersole
getSameTypeConverter
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public void setSameTypeConverter(String sameTypeConverter) { this.sameTypeConverter = sameTypeConverter; }
@author Janario Oliveira @author Steve Ebersole
setSameTypeConverter
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public int getValue() { return value; }
@author Janario Oliveira @author Steve Ebersole
getValue
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
@Override public String toString() { return String.format( "IntegerWrapper{value=%d}", value); }
@author Janario Oliveira @author Steve Ebersole
toString
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public String getValue() { return value; }
@author Janario Oliveira @author Steve Ebersole
getValue
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/literal/QueryLiteralTest.java
Apache-2.0
public String toExternalForm() { return color; }
@author Steve Ebersole an enum-like class (converters are technically not allowed to apply to enums)
toExternalForm
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/map/ColorType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/map/ColorType.java
Apache-2.0
public static ColorType fromExternalForm(String color) { if ( BLUE.color.equals( color ) ) { return BLUE; } else if ( RED.color.equals( color ) ) { return RED; } else if ( YELLOW.color.equals( color ) ) { return YELLOW; } else { throw new RuntimeException( "Unknown color : " + color ); } }
@author Steve Ebersole an enum-like class (converters are technically not allowed to apply to enums)
fromExternalForm
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/map/ColorType.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/map/ColorType.java
Apache-2.0
public Integer getId() { return id; }
Entity demonstrating the registration of a converter for a specific type, other than what the converter advertises @author Steve Ebersole
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/AnotherEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/AnotherEntity.java
Apache-2.0
public String getName() { return name; }
Entity demonstrating the registration of a converter for a specific type, other than what the converter advertises @author Steve Ebersole
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/AnotherEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/AnotherEntity.java
Apache-2.0
public void setName(String name) { this.name = name; }
Entity demonstrating the registration of a converter for a specific type, other than what the converter advertises @author Steve Ebersole
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/AnotherEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/AnotherEntity.java
Apache-2.0
@Test public void verifyMapping(DomainModelScope scope) { scope.withHierarchy( TheEntity2.class, (descriptor) -> { { final Property property = descriptor.getProperty( "thing1" ); final BasicValue valueMapping = (BasicValue) property.getValue(); final ConverterDescriptor converterDescriptor = valueMapp...
Tests for registering converters enabled for auto-apply @implNote Without conversion, `thing1` and `thing2` will be treated as binary data via serialization @author Steve Ebersole
verifyMapping
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/DisablementTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/DisablementTests.java
Apache-2.0
private static <X> Condition<X> oneOf(X... values) { return new OneOfCondition<>( values ); }
Tests for registering converters enabled for auto-apply @implNote Without conversion, `thing1` and `thing2` will be treated as binary data via serialization @author Steve Ebersole
oneOf
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/DisablementTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/DisablementTests.java
Apache-2.0
@Test public void verifyMapping(DomainModelScope scope) { scope.withHierarchy( TheEntity.class, (descriptor) -> { { final Property property = descriptor.getProperty( "thing1" ); final BasicValue valueMapping = (BasicValue) property.getValue(); final ConverterDescriptor converterDescriptor = valueMappi...
Tests for registering converters enabled for auto-apply @author Steve Ebersole
verifyMapping
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/EnablementTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/EnablementTests.java
Apache-2.0
@Test public void verifyMapping(DomainModelScope domainModelScope) { // just getting here indicates success // - although asserting that the log message happens would be nice }
Tests multiple registrations of conversions for a particular domain-type where the definitions match - should simply skip the subsequent registrations @author Steve Ebersole
verifyMapping
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MatchingDuplicateRegistrationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MatchingDuplicateRegistrationTests.java
Apache-2.0
public Integer getId() { return id; }
Tests multiple registrations of conversions for a particular domain-type where the definitions match - should simply skip the subsequent registrations @author Steve Ebersole
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MatchingDuplicateRegistrationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MatchingDuplicateRegistrationTests.java
Apache-2.0
public String getName() { return name; }
Tests multiple registrations of conversions for a particular domain-type where the definitions match - should simply skip the subsequent registrations @author Steve Ebersole
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MatchingDuplicateRegistrationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MatchingDuplicateRegistrationTests.java
Apache-2.0
public void setName(String name) { this.name = name; }
Tests multiple registrations of conversions for a particular domain-type where the definitions match - should simply skip the subsequent registrations @author Steve Ebersole
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MatchingDuplicateRegistrationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MatchingDuplicateRegistrationTests.java
Apache-2.0
public Thing1 getThing1() { return thing1; }
Tests multiple registrations of conversions for a particular domain-type where the definitions match - should simply skip the subsequent registrations @author Steve Ebersole
getThing1
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MatchingDuplicateRegistrationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MatchingDuplicateRegistrationTests.java
Apache-2.0
public void setThing1(Thing1 thing1) { this.thing1 = thing1; }
Tests multiple registrations of conversions for a particular domain-type where the definitions match - should simply skip the subsequent registrations @author Steve Ebersole
setThing1
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MatchingDuplicateRegistrationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MatchingDuplicateRegistrationTests.java
Apache-2.0
@Test @ExpectedException(AnnotationException.class) public void verifyMappingError(ServiceRegistryScope registryScope) { new MetadataSources( registryScope.getRegistry() ).addAnnotatedClass( TroublesomeEntity.class ).buildMetadata(); }
Tests multiple registrations of conversions for a particular domain-type where the definitions match - should simply skip the subsequent registrations @author Steve Ebersole
verifyMappingError
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MismatchDuplicateRegistrationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MismatchDuplicateRegistrationTests.java
Apache-2.0
public Integer getId() { return id; }
Tests multiple registrations of conversions for a particular domain-type where the definitions match - should simply skip the subsequent registrations @author Steve Ebersole
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MismatchDuplicateRegistrationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MismatchDuplicateRegistrationTests.java
Apache-2.0
public String getName() { return name; }
Tests multiple registrations of conversions for a particular domain-type where the definitions match - should simply skip the subsequent registrations @author Steve Ebersole
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MismatchDuplicateRegistrationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MismatchDuplicateRegistrationTests.java
Apache-2.0
public void setName(String name) { this.name = name; }
Tests multiple registrations of conversions for a particular domain-type where the definitions match - should simply skip the subsequent registrations @author Steve Ebersole
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MismatchDuplicateRegistrationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MismatchDuplicateRegistrationTests.java
Apache-2.0
public Thing1 getThing1() { return thing1; }
Tests multiple registrations of conversions for a particular domain-type where the definitions match - should simply skip the subsequent registrations @author Steve Ebersole
getThing1
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MismatchDuplicateRegistrationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MismatchDuplicateRegistrationTests.java
Apache-2.0
public void setThing1(Thing1 thing1) { this.thing1 = thing1; }
Tests multiple registrations of conversions for a particular domain-type where the definitions match - should simply skip the subsequent registrations @author Steve Ebersole
setThing1
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MismatchDuplicateRegistrationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/MismatchDuplicateRegistrationTests.java
Apache-2.0
public Integer getId() { return id; }
Entity demonstrating using registrations which enable auto-apply @author Steve Ebersole
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
Apache-2.0
public String getName() { return name; }
Entity demonstrating using registrations which enable auto-apply @author Steve Ebersole
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
Apache-2.0
public void setName(String name) { this.name = name; }
Entity demonstrating using registrations which enable auto-apply @author Steve Ebersole
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
Apache-2.0
public Thing1 getThing1() { return thing1; }
Entity demonstrating using registrations which enable auto-apply @author Steve Ebersole
getThing1
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
Apache-2.0
public void setThing1(Thing1 thing1) { this.thing1 = thing1; }
Entity demonstrating using registrations which enable auto-apply @author Steve Ebersole
setThing1
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
Apache-2.0
public Thing2 getThing2() { return thing2; }
Entity demonstrating using registrations which enable auto-apply @author Steve Ebersole
getThing2
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
Apache-2.0
public void setThing2(Thing2 thing2) { this.thing2 = thing2; }
Entity demonstrating using registrations which enable auto-apply @author Steve Ebersole
setThing2
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity.java
Apache-2.0
public Integer getId() { return id; }
Entity demonstrating using registrations which disable auto-apply @author Steve Ebersole
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
Apache-2.0
public String getName() { return name; }
Entity demonstrating using registrations which disable auto-apply @author Steve Ebersole
getName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
Apache-2.0
public void setName(String name) { this.name = name; }
Entity demonstrating using registrations which disable auto-apply @author Steve Ebersole
setName
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
Apache-2.0
public Thing1 getThing1() { return thing1; }
Entity demonstrating using registrations which disable auto-apply @author Steve Ebersole
getThing1
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
Apache-2.0
public void setThing1(Thing1 thing1) { this.thing1 = thing1; }
Entity demonstrating using registrations which disable auto-apply @author Steve Ebersole
setThing1
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
Apache-2.0
public Thing2 getThing2() { return thing2; }
Entity demonstrating using registrations which disable auto-apply @author Steve Ebersole
getThing2
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
Apache-2.0
public void setThing2(Thing2 thing2) { this.thing2 = thing2; }
Entity demonstrating using registrations which disable auto-apply @author Steve Ebersole
setThing2
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/TheEntity2.java
Apache-2.0
@Override public String convertToDatabaseColumn(Thing1 attribute) { return null; }
AttributeConverter associated with {@link Thing1}. @implSpec This converter IS NOT auto-applied @author Steve Ebersole
convertToDatabaseColumn
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/Thing1Converter.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/Thing1Converter.java
Apache-2.0
@Override public Thing1 convertToEntityAttribute(String dbData) { return null; }
AttributeConverter associated with {@link Thing1}. @implSpec This converter IS NOT auto-applied @author Steve Ebersole
convertToEntityAttribute
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/Thing1Converter.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/Thing1Converter.java
Apache-2.0
@Override public String convertToDatabaseColumn(Thing2 attribute) { return null; }
AttributeConverter associated with {@link Thing2}. @implSpec This converter IS auto-applied @author Steve Ebersole
convertToDatabaseColumn
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/Thing2Converter.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/Thing2Converter.java
Apache-2.0
@Override public Thing2 convertToEntityAttribute(String dbData) { return null; }
AttributeConverter associated with {@link Thing2}. @implSpec This converter IS auto-applied @author Steve Ebersole
convertToEntityAttribute
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/Thing2Converter.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/registrations/Thing2Converter.java
Apache-2.0
@BeforeAll public void setUp(SessionFactoryScope scope) { scope.inTransaction( session -> { final MyJson myJson = new MyJson( "hello", 100L ); session.persist( new MyEntity( 1L, myJson ) ); } ); }
@author Cedomir Igaly @author Marco Belladelli
setUp
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
Apache-2.0
@AfterAll public void tearDown(SessionFactoryScope scope) { scope.inTransaction( session -> session.createMutationQuery( "delete from MyEntity" ).executeUpdate() ); }
@author Cedomir Igaly @author Marco Belladelli
tearDown
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
Apache-2.0
@Test public void testUpdate(SessionFactoryScope scope) { scope.inTransaction( session -> { final MyEntity found = session.find( MyEntity.class, 1L ); found.getJsonProperty().setStringProp( "updated" ); } ); scope.inTransaction( session -> { final MyEntity found = session.find( MyEntity.class, 1L ); ...
@author Cedomir Igaly @author Marco Belladelli
testUpdate
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
Apache-2.0
@Test public void testQuery(SessionFactoryScope scope) { scope.inTransaction( session -> { final MyEntity result = session.createQuery( "from MyEntity e", MyEntity.class ).getSingleResult(); assertEquals( 100L, result.getJsonProperty().getLongProp() ); } ); }
@author Cedomir Igaly @author Marco Belladelli
testQuery
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
Apache-2.0
@Test public void testQueryWithFilter(SessionFactoryScope scope) { scope.inTransaction( session -> { final List<MyEntity> resultWithFilter = session .createQuery( "from MyEntity e where e.jsonProperty.longProp = :x", MyEntity.class ) .setParameter( "x", 100L ) .getResultList(); assertEquals( 1, ...
@author Cedomir Igaly @author Marco Belladelli
testQueryWithFilter
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
Apache-2.0
public String getStringProp() { return stringProp; }
@author Cedomir Igaly @author Marco Belladelli
getStringProp
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
Apache-2.0
public void setStringProp(String stringProp) { this.stringProp = stringProp; }
@author Cedomir Igaly @author Marco Belladelli
setStringProp
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
Apache-2.0
public Long getLongProp() { return longProp; }
@author Cedomir Igaly @author Marco Belladelli
getLongProp
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
Apache-2.0
public void setLongProp(Long longProp) { this.longProp = longProp; }
@author Cedomir Igaly @author Marco Belladelli
setLongProp
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
Apache-2.0
public Long getId() { return id; }
@author Cedomir Igaly @author Marco Belladelli
getId
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
Apache-2.0
public MyJson getJsonProperty() { return jsonProperty; }
@author Cedomir Igaly @author Marco Belladelli
getJsonProperty
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/JsonEmbeddableAndSchemaNameTest.java
Apache-2.0
@Test @NotImplementedYet void testNestedEmbeddedAndSecondaryTables(ServiceRegistryScope registryScope) { final MetadataSources metadataSources = new MetadataSources( registryScope.getRegistry() ) .addAnnotatedClasses( Book.class, Author.class, House.class ); metadataSources.buildMetadata(); }
Test passes if Author#name is renamed to Author#aname because it will be read before house (alphabetical order). The issue occurs if the nested embedded is read first, due to the table calculation (ComponentPropertyHolder#addProperty) used by the embedded, which retrieves the table from the first property. @author Vin...
testNestedEmbeddedAndSecondaryTables
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/NestedEmbeddedObjectWithASecondaryTableTest.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/NestedEmbeddedObjectWithASecondaryTableTest.java
Apache-2.0
@Test public void basicTest(SessionFactoryScope scope) { scope.inTransaction( (session) -> { final Person mick = new Person( 1, new Name( "Mick", "Jagger" ) ); session.persist( mick ); final Person john = new Person( 2, new Name( "John", "Doe" ) ); john.addAlias( new Name( "Jon", "Doe" ) ); session.p...
Tests for custom {@link EmbeddableInstantiator} usage, specified on the embeddable
basicTest
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/strategy/instantiator/embeddable/InstantiationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/strategy/instantiator/embeddable/InstantiationTests.java
Apache-2.0
@Test public void basicTest(SessionFactoryScope scope) { scope.inTransaction( (session) -> { final Person mick = new Person( 1, new Name( "Mick", "Jagger" ) ); session.persist( mick ); final Person john = new Person( 2, new Name( "John", "Doe" ) ); john.addAlias( new Name( "Jon", "Doe" ) ); session.p...
Tests for custom {@link EmbeddableInstantiator} usage, specified on the embedded
basicTest
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/strategy/instantiator/embedded/InstantiationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/strategy/instantiator/embedded/InstantiationTests.java
Apache-2.0
@Test public void bootModelTest(DomainModelScope scope) { scope.withHierarchy( Person.class, (personMapping) -> { final Property name = personMapping.getProperty( "name" ); final Component nameMapping = (Component) name.getValue(); assertThat( nameMapping.getPropertySpan() ).isEqualTo( 2 ); final Proper...
Builds on {@link org.hibernate.orm.test.mapping.embeddable.strategy.instantiator.intf2.InstantiationTests} attempting to map an interface. At the moment this does not work, as Hibernate fails without setters
bootModelTest
java
hibernate/hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/strategy/instantiator/intf/InstantiationTests.java
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/strategy/instantiator/intf/InstantiationTests.java
Apache-2.0