Hibernate ORM ServiceRegistryBuilder - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM ServiceRegistryBuilder class.

This code example shows how to use the following methods:
	} 
 
	private static StandardServiceRegistryImpl createServiceRegistry(Properties properties) { 
		Environment.verifyProperties( properties ); 
		ConfigurationHelper.resolvePlaceHolders( properties ); 
		return (StandardServiceRegistryImpl) new ServiceRegistryBuilder().applySettings( properties ).buildServiceRegistry(); 
	} 
 
	public static void main(String[] args) { 
		try { 
			Configuration cfg = new Configuration(); 
 
			boolean script = true; 
			// If true then execute db updates, otherwise just generate and display updates 
			boolean doUpdate = true; 
			String propFile = null; 
 
			for ( int i = 0; i < args.length; i++ ) { 
				if ( args[i].startsWith( "--" ) ) { 
					if ( args[i].equals( "--quiet" ) ) { 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	private StandardServiceRegistryImpl serviceRegistry; 
	private ClassLoaderService classLoaderService; 
 
	@Before 
	public void setUp() { 
		serviceRegistry = (StandardServiceRegistryImpl) new ServiceRegistryBuilder().buildServiceRegistry(); 
		classLoaderService = serviceRegistry.getService( ClassLoaderService.class ); 
	} 
 
	@After 
	public void tearDown() { 
		serviceRegistry.destroy(); 
	} 
 
	@Test 
	public void testGetMemberAnnotations() { 
		class Foo { 
			@Column 
			@Basic 
			private String bar; 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
public class BatchingTest extends BaseUnitTestCase implements BatchKey {
	private StandardServiceRegistryImpl serviceRegistry;
 
	@Before 
	public void setUp() throws Exception {
		serviceRegistry = (StandardServiceRegistryImpl) new ServiceRegistryBuilder()
				.applySettings( ConnectionProviderBuilder.getConnectionProviderProperties() )
				.buildServiceRegistry(); 
	} 
 
	@After 
	public void tearDown() throws Exception {
		serviceRegistry.destroy();
	} 
 
	@Override 
	public int getBatchedStatementCount() { 
		return 1; 
	} 
 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
	private StandardServiceRegistryImpl serviceRegistry;
 
	@Before 
	public void setUp() { 
		serviceRegistry = (StandardServiceRegistryImpl) new ServiceRegistryBuilder().buildServiceRegistry();
	} 
 
	@After 
	public void tearDown() { 
		serviceRegistry.destroy();
	} 
 
	protected ServiceRegistry basicServiceRegistry() {
		return serviceRegistry;
	} 
 
	@Test
	public void testSimpleEntityMapping() { 
		MetadataSources sources = new MetadataSources( serviceRegistry );
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	} 
 
	private static StandardServiceRegistryImpl createServiceRegistry(Properties properties) { 
		Environment.verifyProperties( properties ); 
		ConfigurationHelper.resolvePlaceHolders( properties ); 
		return (StandardServiceRegistryImpl) new ServiceRegistryBuilder().applySettings( properties ).buildServiceRegistry(); 
	} 
 
	public static void main(String[] args) { 
		try { 
			Configuration cfg = new Configuration(); 
 
			String propFile = null; 
 
			for ( int i = 0; i < args.length; i++ ) { 
				if ( args[i].startsWith( "--" ) ) { 
					if ( args[i].startsWith( "--properties=" ) ) { 
						propFile = args[i].substring( 13 ); 
					} 
					else if ( args[i].startsWith( "--config=" ) ) { 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 */ 
public class MetadataImplTest extends BaseUnitTestCase { 
 
	@Test(expected = IllegalArgumentException.class)
	public void testAddingNullClass() { 
		MetadataSources sources = new MetadataSources( new ServiceRegistryBuilder().buildServiceRegistry() );
		sources.addClass( null );
		sources.buildMetadata();
	} 
 
	@Test(expected = IllegalArgumentException.class)
	public void testAddingNullPackageName() { 
		MetadataSources sources = new MetadataSources( new ServiceRegistryBuilder().buildServiceRegistry() );
		sources.addPackage( null );
		sources.buildMetadata();
	} 
 
	@Test(expected = HibernateException.class)
	public void testAddingNonExistingPackageName() { 
		MetadataSources sources = new MetadataSources( new ServiceRegistryBuilder().buildServiceRegistry() );
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	private ClassLoaderService service; 
	private MetadataImpl meta; 
 
	@Before 
	public void setUp() { 
		serviceRegistry = (StandardServiceRegistryImpl) new ServiceRegistryBuilder().buildServiceRegistry(); 
		service = serviceRegistry.getService( ClassLoaderService.class ); 
		meta = (MetadataImpl) new MetadataSources( serviceRegistry ).buildMetadata(); 
	} 
 
	@After 
	public void tearDown() { 
		serviceRegistry.destroy(); 
	} 
 
	@Test 
	public void testSingleFetchProfile() { 
		@FetchProfile(name = "foo", fetchOverrides = { 
				@FetchProfile.FetchOverride(entity = Foo.class, association = "bar", mode = FetchMode.JOIN) 
		}) 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	} 
 
	private static StandardServiceRegistryImpl createServiceRegistry(Properties properties) {
		Environment.verifyProperties( properties );
		ConfigurationHelper.resolvePlaceHolders( properties );
		return (StandardServiceRegistryImpl) new ServiceRegistryBuilder().applySettings( properties ).buildServiceRegistry();
	} 
 
	public Connection getConnection() throws SQLException {
		return connection;
	} 
 
	public void release() throws SQLException {
		try { 
			releaseConnection(); 
		} 
		finally { 
			releaseServiceRegistry(); 
		} 
	} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
public class BasicCollectionBindingTests extends BaseUnitTestCase { 
	private StandardServiceRegistryImpl serviceRegistry; 
 
	@Before 
	public void setUp() { 
		serviceRegistry = (StandardServiceRegistryImpl) new ServiceRegistryBuilder().buildServiceRegistry(); 
	} 
 
	@After 
	public void tearDown() { 
		serviceRegistry.destroy(); 
	} 
 
//	@Test 
//	public void testAnnotations() { 
//		doTest( MetadataSourceProcessingOrder.ANNOTATIONS_FIRST ); 
//	} 
 
	@Test 
	public void testHbm() { 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		assertNotNull( binding );
	} 
 
	@Test(expected = MappingException.class)
	public void testInvalidOrmXmlThrowsException() { 
		MetadataSources sources = new MetadataSources( new ServiceRegistryBuilder().buildServiceRegistry() );
		sources.addResource( "org/hibernate/metamodel/source/annotations/xml/orm-invalid.xml" );
		sources.buildMetadata();
	} 
} 
 
 
5
CodeRank
Experience pair programming with AI  Get Codota for Java