Best code examples for Hibernate ORM AnnotationConfiguration class (org.hibernate.cfg.AnnotationConfiguration)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM AnnotationConfiguration class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM AnnotationConfiguration examples from Open Source projects
This code example shows how to use the following methods: configure, buildSessionFactory
57:	AnnotationConfiguration cfg = new AnnotationConfiguration(); 
58:	cfg.configure().setProperty("hibernate.connection.url", "jdbc:hsqldb:mem:mydvdsDB"); 
59:	session = cfg.buildSessionFactory().openSession(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: configure, setProperties, buildSessionFactory, addFilterDefinition
32:	AnnotationConfiguration cfg = new AnnotationConfiguration(); 
33:	cfg.addFilterDefinition(new FilterDefinition("securityFilter", 
-
35:	cfg.configure(testCfg); 
36:	cfg.setProperties(props); 
37:	sessionFactory = cfg.buildSessionFactory(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: configure, buildSessionFactory
88:	AnnotationConfiguration cfg = new AnnotationConfiguration(); 
89:	cfg.configure().setProperty("hibernate.connection.url", "jdbc:hsqldb:mem:mydvdsDB"); 
90:	session = cfg.buildSessionFactory().openSession(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addAnnotatedClass, buildSessionFactory
174:	AnnotationConfiguration cfg = new AnnotationConfiguration(); 
-
176:	cfg.addAnnotatedClass( classUnderTest ); 
177:	cfg.addAnnotatedClass( Person.class ); 
178:	cfg.addAnnotatedClass( Being.class ); 
179:	SessionFactoryImplementor factory = ( SessionFactoryImplementor ) cfg.buildSessionFactory( serviceRegistry ); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: addAnnotatedClass, setProperty, buildSessionFactory
221:	AnnotationConfiguration configuration = new AnnotationConfiguration(); 
-
223:	configuration.addAnnotatedClass( puppet ); 
-
225:	configuration.setProperty( "hibernate.hbm2ddl.auto", "create-drop" ); 
226:	SessionFactory sf = configuration.buildSessionFactory(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addAnnotatedClass, setNamingStrategy, buildSessionFactory
43:	AnnotationConfiguration config = new AnnotationConfiguration(); 
44:	config.setNamingStrategy(new DummyNamingStrategy()); 
45:	config.addAnnotatedClass(Address.class); 
46:	config.addAnnotatedClass(Person.class); 
47:	config.buildSessionFactory( serviceRegistry ); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
40:	SessionFactory original = new AnnotationConfiguration().configure().buildSessionFactory(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addAnnotatedClass, buildSessionFactory
145:	AnnotationConfiguration configuration = new AnnotationConfiguration(); 
146:	configuration.addAnnotatedClass( getUcl().loadClass( "Project" ) ); 
147:	configuration.addAnnotatedClass( getUcl().loadClass( "Employee" ) ); 
148:	configuration.addAnnotatedClass( getUcl().loadClass( "WorksOnContext" ) ); 
-
150:	SessionFactory sf = configuration.buildSessionFactory(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: configure, buildSessionFactory
45:	final AnnotationConfiguration cfg = new AnnotationConfiguration(); // 这里读com.login.system.bean.Users 
-
47:	cfg.configure();//("/hibernate.cfg.xml"); // 路径可以改变 
48:	sessionFactory = cfg.buildSessionFactory(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
123:	new AnnotationConfiguration().configure(resource).buildSessionFactory(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: configure
26:	public ConstructableAnnotationConfiguration() { 
27:	this.configure(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
42:	AnnotationConfiguration configuration = new AnnotationConfiguration() 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addPackage, addResource
13:	AnnotationConfiguration config = new AnnotationConfiguration(); 
14:	config.addResource( "org/hibernate/test/annotations/configuration/orm.xml" ); 
15:	config.addPackage( "org.hibernate.test.annotations.configuration" ); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
50:	AnnotationConfiguration configuration = new AnnotationConfiguration() 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addAnnotatedClass, configure
31:	AnnotationConfiguration ac = new AnnotationConfiguration(); 
32:	ac.addAnnotatedClass(Livro.class); 
33:	sessionFactory = ac.configure().buildSessionFactory(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
23:	configuration = new AnnotationConfiguration(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
26:	sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: addAnnotatedClass, configure
14:	Configuration cfg = new AnnotationConfiguration(); 
-
18:	cfg.addAnnotatedClass(Onibus.class); 
19:	cfg.addAnnotatedClass(PontoDeOnibus.class); 
-
22:	return cfg.configure().buildSessionFactory().openSession(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setProperty, buildSessionFactory
31:	cfg.setProperty("hibernate.connection.url", "jdbc:hsqldb:hsql://localhost:9005/calopsita"); 
32:	sessionFactory = cfg.buildSessionFactory(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: buildSessionFactory
46:	factory = configuration.buildSessionFactory(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
31:	sessionFactory = new AnnotationConfiguration().configure() 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
38:	annotationConfiguration = new AnnotationConfiguration().configure("/META-INF/hibernate.xml"); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: addAnnotatedClass, configure, buildSessionFactory
19:	AnnotationConfiguration annotationConfiguration = new AnnotationConfiguration(); 
20:	annotationConfiguration.addAnnotatedClass(User.class); 
-
22:	.configure("com/earldouglas/dategrity/hibernate.cfg.xml"); 
23:	sessionFactory = annotationConfiguration.buildSessionFactory(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: addAnnotatedClass, setProperties
23:	AnnotationConfiguration config = new AnnotationConfiguration(); 
-
29:	config.setProperties(properties); 
30:	config.addAnnotatedClass(Contact.class); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods:
44:	sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods:
75:	hibernateConfig = new AnnotationConfiguration(); 
Full Snippet Info
3
CodeRank
This code example shows how to use the following methods:
14:	sessionFactory = new AnnotationConfiguration().configure(configuration).buildSessionFactory(); 
Full Snippet Info
4
CodeRank
See Code Examples for Hibernate ORM AnnotationConfiguration Methods: