HHH-6230 Formatting and typo fix in method name

This commit is contained in:
Hardy Ferentschik 2011-05-17 12:25:33 +02:00
parent 2fd2bc3e8d
commit db4e0b0c52
15 changed files with 68 additions and 32 deletions

View File

@ -52,7 +52,7 @@ public class SimpleAttributeBinding extends AbstractAttributeBinding implements
super.initialize( state );
insertable = state.isInsertable();
updateable = state.isUpdateable();
keyCasadeDeleteEnabled = state.isKeyCasadeDeleteEnabled();
keyCasadeDeleteEnabled = state.isKeyCascadeDeleteEnabled();
unsavedValue = state.getUnsavedValue();
generation = state.getPropertyGeneration() == null ? PropertyGeneration.NEVER : state.getPropertyGeneration();
return this;

View File

@ -76,7 +76,7 @@ public class AnnotationsAttributeBindingState implements SimpleAttributeBindingS
}
@Override
public boolean isKeyCasadeDeleteEnabled() {
public boolean isKeyCascadeDeleteEnabled() {
return false; //To change body of implemented methods use File | Settings | File Templates.
}

View File

@ -112,7 +112,7 @@ public abstract class AbstractHbmAttributeBindingState implements AttributeBindi
return PropertyGeneration.NEVER;
}
public boolean isKeyCasadeDeleteEnabled() {
public boolean isKeyCascadeDeleteEnabled() {
return false;
}

View File

@ -164,7 +164,7 @@ public class HbmManyToOneAttributeBindingState
return isUpdateable;
}
public boolean isKeyCasadeDeleteEnabled() {
public boolean isKeyCascadeDeleteEnabled() {
//TODO: implement
return false;
}

View File

@ -286,7 +286,7 @@ public class HbmPluralAttributeBindingState extends AbstractHbmAttributeBindingS
return cascade;
}
public boolean isKeyCasadeDeleteEnabled() {
public boolean isKeyCascadeDeleteEnabled() {
//TODO: implement
return false;
}

View File

@ -265,7 +265,7 @@ public class HbmSimpleAttributeBindingState extends AbstractHbmAttributeBindingS
return null;
}
public boolean isKeyCasadeDeleteEnabled() {
public boolean isKeyCascadeDeleteEnabled() {
//TODO: implement
return false;
}

View File

@ -26,8 +26,6 @@ package org.hibernate.metamodel.state.binding;
import java.util.Map;
import java.util.Properties;
import org.hibernate.metamodel.binding.HibernateTypeDescriptor;
import org.hibernate.metamodel.domain.Attribute;
import org.hibernate.metamodel.domain.MetaAttribute;
/**
@ -35,13 +33,22 @@ import org.hibernate.metamodel.domain.MetaAttribute;
*/
public interface AttributeBindingState {
String getAttributeName();
String getTypeName();
Properties getTypeParameters();
boolean isLazy();
String getPropertyAccessorName();
boolean isAlternateUniqueKey();
String getCascade();
boolean isOptimisticLockable();
String getNodeName();
Map<String, MetaAttribute> getMetaAttributes();
}

View File

@ -23,8 +23,6 @@
*/
package org.hibernate.metamodel.state.binding;
import org.hibernate.metamodel.binding.AttributeBinding;
/**
* @author Gail Badner
*/

View File

@ -28,7 +28,10 @@ package org.hibernate.metamodel.state.binding;
*/
public interface ManyToOneAttributeBindingState extends SimpleAttributeBindingState {
boolean isUnwrapProxy();
String getReferencedAttributeName();
String getReferencedEntityName();
boolean ignoreNotFound();
}

View File

@ -29,38 +29,60 @@ import org.hibernate.FetchMode;
import org.hibernate.metamodel.binding.CustomSQL;
/**
* Created by IntelliJ IDEA.
* User: gbadner
* Date: 5/9/11
* Time: 4:49 PM
* To change this template use File | Settings | File Templates.
* @author gbadner
*/
public interface PluralAttributeBindingState extends AttributeBindingState {
FetchMode getFetchMode();
boolean isExtraLazy();
String getElementTypeName();
String getElementNodeName();
boolean isInverse();
boolean isMutable();
boolean isSubselectLoadable();
String getCacheConcurrencyStrategy();
String getCacheRegionName();
String getOrderBy();
String getWhere();
String getReferencedPropertyName();
boolean isSorted();
Comparator getComparator();
String getComparatorClassName();
boolean isOrphanDelete();
int getBatchSize();
boolean isEmbedded();
boolean isOptimisticLocked();
Class getCollectionPersisterClass();
java.util.Map getFilters();
java.util.Set getSynchronizedTables();
CustomSQL getCustomSQLInsert();
CustomSQL getCustomSQLUpdate();
CustomSQL getCustomSQLDelete();
CustomSQL getCustomSQLDeleteAll();
String getLoaderName();
}

View File

@ -30,8 +30,12 @@ import org.hibernate.mapping.PropertyGeneration;
*/
public interface SimpleAttributeBindingState extends AttributeBindingState {
boolean isInsertable();
boolean isUpdateable();
boolean isKeyCasadeDeleteEnabled();
boolean isKeyCascadeDeleteEnabled();
String getUnsavedValue();
public PropertyGeneration getPropertyGeneration();
}

View File

@ -33,16 +33,28 @@ import org.hibernate.metamodel.relational.Size;
*/
public interface ColumnRelationalState extends SimpleValueRelationalState {
NamingStrategy getNamingStrategy();
String getExplicitColumnName();
boolean isUnique();
Size getSize();
boolean isNullable();
String getCheckCondition();
String getDefault();
String getSqlType();
String getCustomWriteFragment();
String getCustomReadFragment();
String getComment();
Set<String> getUniqueKeys();
Set<String> getIndexes();
}

View File

@ -23,14 +23,8 @@
*/
package org.hibernate.metamodel.state.relational;
import org.hibernate.metamodel.relational.SimpleValue;
/**
* Created by IntelliJ IDEA.
* User: gbadner
* Date: 5/9/11
* Time: 2:15 PM
* To change this template use File | Settings | File Templates.
* @author Gail Badner
*/
public interface DerivedValueRelationalState extends SimpleValueRelationalState {
String getFormula();

View File

@ -28,5 +28,6 @@ package org.hibernate.metamodel.state.relational;
*/
public interface ManyToOneRelationalState extends ValueRelationalState {
boolean isLogicalOneToOne();
String getForeignKeyName();
}

View File

@ -30,11 +30,6 @@ import org.hibernate.metamodel.relational.SimpleValue;
import org.hibernate.metamodel.relational.TableSpecification;
import org.hibernate.metamodel.relational.Tuple;
import org.hibernate.metamodel.relational.Value;
import org.hibernate.metamodel.state.relational.ColumnRelationalState;
import org.hibernate.metamodel.state.relational.DerivedValueRelationalState;
import org.hibernate.metamodel.state.relational.ValueRelationalState;
import org.hibernate.metamodel.state.relational.SimpleValueRelationalState;
import org.hibernate.metamodel.state.relational.TupleRelationalState;
/**
* @author Gail Badner
@ -64,7 +59,7 @@ public class ValueCreator {
return value;
}
public static DerivedValue createDerivedValue(TableSpecification table,
public static DerivedValue createDerivedValue(TableSpecification table,
DerivedValueRelationalState state) {
return table.createDerivedValue( state.getFormula() );
}
@ -74,7 +69,7 @@ public class ValueCreator {
SimpleValueRelationalState state,
boolean forceNonNullable,
boolean forceUnique
) {
) {
if ( state instanceof ColumnRelationalState ) {
ColumnRelationalState columnRelationalState = ColumnRelationalState.class.cast( state );
return createColumn( table, attributeName, columnRelationalState, forceNonNullable, forceUnique );
@ -93,7 +88,7 @@ public class ValueCreator {
boolean forceNonNullable,
boolean forceUnique
) {
Tuple tuple = table.createTuple( "[" + attributeName + "]" );
Tuple tuple = table.createTuple( "[" + attributeName + "]" );
for ( SimpleValueRelationalState valueState : state.getRelationalStates() ) {
tuple.addValue( createSimpleValue( table, attributeName, valueState, forceNonNullable, forceUnique ) );
}
@ -107,7 +102,7 @@ public class ValueCreator {
boolean forceUnique) {
Value value = null;
if ( SimpleValueRelationalState.class.isInstance( state ) ) {
value = createSimpleValue(
value = createSimpleValue(
table,
attributeName,
SimpleValueRelationalState.class.cast( state ),