Search in sources :

Example 1 with ValueVisitor

use of org.hibernate.mapping.ValueVisitor in project hibernate-orm by hibernate.

the class ValueVisitorTest method testProperCallbacks.

@Test
public void testProperCallbacks() {
    final MetadataImplementor metadata = (MetadataImplementor) new MetadataSources(serviceRegistry).buildMetadata();
    final Table tbl = new Table();
    final RootClass rootClass = new RootClass(metadataBuildingContext);
    ValueVisitor vv = new ValueVisitorValidator();
    MetadataBuildingContextTestingImpl metadataBuildingContext = new MetadataBuildingContextTestingImpl();
    new Any(metadataBuildingContext, tbl).accept(vv);
    new Array(metadataBuildingContext, rootClass).accept(vv);
    new Bag(metadataBuildingContext, rootClass).accept(vv);
    new Component(metadataBuildingContext, rootClass).accept(vv);
    new DependantValue(metadataBuildingContext, tbl, null).accept(vv);
    new IdentifierBag(metadataBuildingContext, rootClass).accept(vv);
    new List(metadataBuildingContext, rootClass).accept(vv);
    new ManyToOne(metadataBuildingContext, tbl).accept(vv);
    new Map(metadataBuildingContext, rootClass).accept(vv);
    new OneToMany(metadataBuildingContext, rootClass).accept(vv);
    new OneToOne(metadataBuildingContext, tbl, rootClass).accept(vv);
    new PrimitiveArray(metadataBuildingContext, rootClass).accept(vv);
    new Set(metadataBuildingContext, rootClass).accept(vv);
    new SimpleValue(metadataBuildingContext).accept(vv);
}
Also used : RootClass(org.hibernate.mapping.RootClass) Table(org.hibernate.mapping.Table) Set(org.hibernate.mapping.Set) ValueVisitor(org.hibernate.mapping.ValueVisitor) DependantValue(org.hibernate.mapping.DependantValue) MetadataSources(org.hibernate.boot.MetadataSources) Bag(org.hibernate.mapping.Bag) IdentifierBag(org.hibernate.mapping.IdentifierBag) MetadataImplementor(org.hibernate.boot.spi.MetadataImplementor) IdentifierBag(org.hibernate.mapping.IdentifierBag) OneToMany(org.hibernate.mapping.OneToMany) Any(org.hibernate.mapping.Any) ManyToOne(org.hibernate.mapping.ManyToOne) SimpleValue(org.hibernate.mapping.SimpleValue) MetadataBuildingContextTestingImpl(org.hibernate.testing.boot.MetadataBuildingContextTestingImpl) Array(org.hibernate.mapping.Array) PrimitiveArray(org.hibernate.mapping.PrimitiveArray) OneToOne(org.hibernate.mapping.OneToOne) PrimitiveArray(org.hibernate.mapping.PrimitiveArray) List(org.hibernate.mapping.List) Component(org.hibernate.mapping.Component) Map(org.hibernate.mapping.Map) Test(org.junit.Test)

Aggregations

MetadataSources (org.hibernate.boot.MetadataSources)1 MetadataImplementor (org.hibernate.boot.spi.MetadataImplementor)1 Any (org.hibernate.mapping.Any)1 Array (org.hibernate.mapping.Array)1 Bag (org.hibernate.mapping.Bag)1 Component (org.hibernate.mapping.Component)1 DependantValue (org.hibernate.mapping.DependantValue)1 IdentifierBag (org.hibernate.mapping.IdentifierBag)1 List (org.hibernate.mapping.List)1 ManyToOne (org.hibernate.mapping.ManyToOne)1 Map (org.hibernate.mapping.Map)1 OneToMany (org.hibernate.mapping.OneToMany)1 OneToOne (org.hibernate.mapping.OneToOne)1 PrimitiveArray (org.hibernate.mapping.PrimitiveArray)1 RootClass (org.hibernate.mapping.RootClass)1 Set (org.hibernate.mapping.Set)1 SimpleValue (org.hibernate.mapping.SimpleValue)1 Table (org.hibernate.mapping.Table)1 ValueVisitor (org.hibernate.mapping.ValueVisitor)1 MetadataBuildingContextTestingImpl (org.hibernate.testing.boot.MetadataBuildingContextTestingImpl)1