Skip to content

Instantly share code, notes, and snippets.

@gbadner
gbadner / gist:8294930
Created January 7, 2014 05:19
EnumType conflict (HHH-7776)
<<<<<<< HEAD
public class EnumType implements EnhancedUserType, DynamicParameterizedType,LoggableUserType, Serializable {
=======
public class EnumType implements EnhancedUserType, DynamicParameterizedType, Serializable, StringRepresentableType {
>>>>>>> HHH-7776 - Consolidate to/from string handling for types in StringRepresentableType
private static final Logger LOG = Logger.getLogger( EnumType.class.getName() );
public static final String ENUM = "enumClass";
public static final String NAMED = "useNamed";
public static final String TYPE = "type";
@gbadner
gbadner / gist:8288905
Created January 6, 2014 20:02
BaseCoreFunctionalTestCase conflict
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
@gbadner
gbadner / gist:8287045
Created January 6, 2014 18:18
ClassLoaderServiceImpl conflict
package org.hibernate.boot.registry.classloading.internal;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
@gbadner
gbadner / gist:8225496
Created January 2, 2014 19:53
HHH-7472 Index merge
public class Index extends AbstractConstraint implements Constraint {
protected Index(Table table, String name) {
super( table, name );
}
@Override
public String getExportIdentifier() {
StringBuilder sb = new StringBuilder( getTable().getLoggableValueQualifier());
sb.append( ".IDX" );
@gbadner
gbadner / gist:8103843
Created December 23, 2013 20:13
JdbcServicesImpl
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2010, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
@gbadner
gbadner / gist:8101698
Created December 23, 2013 17:58
UniqueKey
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2010 by Red Hat Inc and/or its affiliates or by
* third-party contributors as indicated by either @author tags or express
* copyright attribution statements applied by the authors. All
* third-party contributions are distributed under license by Red Hat Inc.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
@gbadner
gbadner / gist:8045073
Created December 19, 2013 19:48
EntityManagerFactoryBuilderImpl
public class EntityManagerFactoryBuilderImpl implements EntityManagerFactoryBuilder {
private static final EntityManagerMessageLogger LOG = Logger.getMessageLogger(
EntityManagerMessageLogger.class,
EntityManagerFactoryBuilderImpl.class.getName()
);
private static final String META_INF_ORM_XML = "META-INF/orm.xml";
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@gbadner
gbadner / gist:8030497
Created December 18, 2013 21:53
org.hibernate.metamodel.spi.relational.UniqueKey
public class UniqueKey extends AbstractConstraint implements Constraint {
private static final String GENERATED_NAME_PREFIX = "UK";
protected UniqueKey(Table table, String name) {
super( table, name );
}
@Override
public String getExportIdentifier() {
StringBuilder sb = new StringBuilder( getTable().getLoggableValueQualifier() );
@gbadner
gbadner / gist:8030453
Created December 18, 2013 21:51
org.hibernate.metamodel.spi.relational.Table
public class Table extends AbstractTableSpecification implements Exportable {
private final Schema database;
private Identifier physicalName;
private Identifier logicalName;
private ObjectName objectName;
private String exportIdentifier;
private final Set<Index> indexes = new LinkedHashSet<Index>();
private final Set<UniqueKey> uniqueKeys = new LinkedHashSet<UniqueKey>();
private final List<CheckConstraint> checkConstraints = new ArrayList<CheckConstraint>();
@gbadner
gbadner / gist:8030434
Created December 18, 2013 21:50
org.hibernate.metamodel.spi.relational.Index
public class Index extends AbstractConstraint implements Constraint {
protected Index(Table table, String name) {
super( table, name );
}
@Override
public String getExportIdentifier() {
StringBuilder sb = new StringBuilder( getTable().getLoggableValueQualifier());
sb.append( ".IDX" );