org.hibernate.mapping.Property.setUpdateable()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(10.1k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.hibernate.mapping.Property.setUpdateable()方法的一些代码示例,展示了Property.setUpdateable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.setUpdateable()方法的具体详情如下:
包路径:org.hibernate.mapping.Property
类名称:Property
方法名:setUpdateable

Property.setUpdateable介绍

暂无

代码示例

代码示例来源:origin: hibernate/hibernate-orm

Property clone = BinderHelper.shallowCopy( property );
  clone.setInsertable( false );
  clone.setUpdateable( false );
  clone.setNaturalIdentifier( false );
  clone.setValueGenerationStrategy( property.getValueGenerationStrategy() );
synthProp.setName( syntheticPropertyName );
synthProp.setPersistentClass( ownerEntity );
synthProp.setUpdateable( false );
synthProp.setInsertable( false );
synthProp.setValue( embeddedComp );

代码示例来源:origin: hibernate/hibernate-orm

private void handleNaturalIdBinding(
    MappingDocument mappingDocument,
    PersistentClass entityBinding,
    Property attributeBinding,
    NaturalIdMutability naturalIdMutability) {
  if ( naturalIdMutability == NaturalIdMutability.NOT_NATURAL_ID ) {
    return;
  }
  attributeBinding.setNaturalIdentifier( true );
  if ( naturalIdMutability == NaturalIdMutability.IMMUTABLE ) {
    attributeBinding.setUpdateable( false );
  }
  NaturalIdUniqueKeyBinder ukBinder = mappingDocument.getMetadataCollector().locateNaturalIdUniqueKeyBinder(
      entityBinding.getEntityName()
  );
  if ( ukBinder == null ) {
    ukBinder = new NaturalIdUniqueKeyBinderImpl( mappingDocument, entityBinding );
    mappingDocument.getMetadataCollector().registerNaturalIdUniqueKeyBinder(
        entityBinding.getEntityName(),
        ukBinder
    );
  }
  ukBinder.addAttributeBinding( attributeBinding );
}

代码示例来源:origin: hibernate/hibernate-orm

property.setUpdateable( singularAttributeSource.isUpdatable() );
        mappingDocument.getOrigin()
    );
    property.setUpdateable( false );

代码示例来源:origin: hibernate/hibernate-orm

newProperty.setValueGenerationStrategy( current.getValueGenerationStrategy() );
newProperty.setInsertable( false );
newProperty.setUpdateable( false );
newProperty.setMetaAttributes( current.getMetaAttributes() );
newProperty.setName( current.getName() );

代码示例来源:origin: hibernate/hibernate-orm

property.setUpdateable( false );
property.setInsertable( false );
property.setValue( mapper );

代码示例来源:origin: hibernate/hibernate-orm

/**
 * create a property copy reusing the same value
 */
public static Property shallowCopy(Property property) {
  Property clone = new Property();
  clone.setCascade( property.getCascade() );
  clone.setInsertable( property.isInsertable() );
  clone.setLazy( property.isLazy() );
  clone.setName( property.getName() );
  clone.setNaturalIdentifier( property.isNaturalIdentifier() );
  clone.setOptimisticLocked( property.isOptimisticLocked() );
  clone.setOptional( property.isOptional() );
  clone.setPersistentClass( property.getPersistentClass() );
  clone.setPropertyAccessorName( property.getPropertyAccessorName() );
  clone.setSelectable( property.isSelectable() );
  clone.setUpdateable( property.isUpdateable() );
  clone.setValue( property.getValue() );
  return clone;
}

代码示例来源:origin: hibernate/hibernate-orm

Property property = new Property();
property.setName( PropertyPath.IDENTIFIER_MAPPER_PROPERTY );
property.setUpdateable( false );
property.setInsertable( false );
property.setValue( mapper );

代码示例来源:origin: hibernate/hibernate-orm

prop.setUpdateable( updatable );

代码示例来源:origin: org.hibernate/hibernate-annotations

Property clone = BinderHelper.shallowCopy( property );
  clone.setInsertable( false );
  clone.setUpdateable( false );
  clone.setNaturalIdentifier( false );
  clone.setGeneration( property.getGeneration() );
synthProp.setNodeName( syntheticPropertyName );
synthProp.setPersistentClass( ownerEntity );
synthProp.setUpdateable( false );
synthProp.setInsertable( false );
synthProp.setValue( embeddedComp );

代码示例来源:origin: org.hibernate/hibernate-annotations

newProperty.setGeneration( current.getGeneration() );
newProperty.setInsertable( false );
newProperty.setUpdateable( false );
newProperty.setMetaAttributes( current.getMetaAttributes() );
newProperty.setName( current.getName() );

代码示例来源:origin: org.hibernate/hibernate-annotations

prop.setUpdateable( updatable );
OptimisticLock lockAnn = property != null ?
    property.getAnnotation( OptimisticLock.class ) :

代码示例来源:origin: org.hibernate/hibernate-annotations

property.setName( "_identifierMapper" );
property.setNodeName( "id" );
property.setUpdateable( false );
property.setInsertable( false );
property.setValue( mapper );

代码示例来源:origin: org.hibernate/hibernate-annotations

/**
 * create a property copy reusing the same value
 */
public static Property shallowCopy(Property property) {
  Property clone = new Property();
  clone.setCascade( property.getCascade() );
  clone.setInsertable( property.isInsertable() );
  clone.setLazy( property.isLazy() );
  clone.setName( property.getName() );
  clone.setNodeName( property.getNodeName() );
  clone.setNaturalIdentifier( property.isNaturalIdentifier() );
  clone.setOptimisticLocked( property.isOptimisticLocked() );
  clone.setOptional( property.isOptional() );
  clone.setPersistentClass( property.getPersistentClass() );
  clone.setPropertyAccessorName( property.getPropertyAccessorName() );
  clone.setSelectable( property.isSelectable() );
  clone.setUpdateable( property.isUpdateable() );
  clone.setValue( property.getValue() );
  return clone;
}

代码示例来源:origin: org.grails/grails-datastore-gorm-hibernate-core

protected void bindNaturalIdentifier(Table table, Mapping mapping, PersistentClass persistentClass) {
  Object o = mapping != null ? mapping.getIdentity() : null;
  if (!(o instanceof Identity)) {
    return;
  }
  Identity identity = (Identity) o;
  final NaturalId naturalId = identity.getNatural();
  if (naturalId == null || naturalId.getPropertyNames().isEmpty()) {
    return;
  }
  UniqueKey uk = new UniqueKey();
  uk.setTable(table);
  boolean mutable = naturalId.isMutable();
  for (String propertyName : naturalId.getPropertyNames()) {
    Property property = persistentClass.getProperty(propertyName);
    property.setNaturalIdentifier(true);
    if (!mutable) property.setUpdateable(false);
    uk.addColumns(property.getColumnIterator());
  }
  setGeneratedUniqueName(uk);
  table.addUniqueKey(uk);
}

代码示例来源:origin: org.grails/grails-hibernate

private static void bindNaturalIdentifier(Table table, Mapping mapping, PersistentClass persistentClass) {
  Object o = mapping != null ? mapping.getIdentity() : null;
  if (!(o instanceof Identity)) {
    return;
  }
  Identity identity = (Identity) o;
  final NaturalId naturalId = identity.getNatural();
  if (naturalId == null || naturalId.getPropertyNames().isEmpty()) {
    return;
  }
  UniqueKey uk = new UniqueKey();
  uk.setName("_UniqueKey");
  uk.setTable(table);
  boolean mutable = naturalId.isMutable();
  for (String propertyName : naturalId.getPropertyNames()) {
    Property property = persistentClass.getProperty(propertyName);
    property.setNaturalIdentifier(true);
    if (!mutable) property.setUpdateable(false);
    uk.addColumns(property.getColumnIterator());
  }
  table.addUniqueKey(uk);
}

代码示例来源:origin: org.hibernate.orm/hibernate-core

private void handleNaturalIdBinding(
    MappingDocument mappingDocument,
    PersistentClass entityBinding,
    Property attributeBinding,
    NaturalIdMutability naturalIdMutability) {
  if ( naturalIdMutability == NaturalIdMutability.NOT_NATURAL_ID ) {
    return;
  }
  attributeBinding.setNaturalIdentifier( true );
  if ( naturalIdMutability == NaturalIdMutability.IMMUTABLE ) {
    attributeBinding.setUpdateable( false );
  }
  NaturalIdUniqueKeyBinder ukBinder = mappingDocument.getMetadataCollector().locateNaturalIdUniqueKeyBinder(
      entityBinding.getEntityName()
  );
  if ( ukBinder == null ) {
    ukBinder = new NaturalIdUniqueKeyBinderImpl( mappingDocument, entityBinding );
    mappingDocument.getMetadataCollector().registerNaturalIdUniqueKeyBinder(
        entityBinding.getEntityName(),
        ukBinder
    );
  }
  ukBinder.addAttributeBinding( attributeBinding );
}

代码示例来源:origin: org.hibernate.orm/hibernate-core

public Property shallowCopy() {
    Property clone = new Property( context );
    clone.setCascade( getCascade() );
    clone.setInsertable( isInsertable() );
    clone.setLazy( isLazy() );
    clone.setName( getName() );
    clone.setNaturalIdentifier( isNaturalIdentifier() );
    clone.setOptimisticLocked( isOptimisticLocked() );
    clone.setOptional( isOptional() );
    clone.setPersistentClass( (PersistentClass) getEntity() );
    clone.setPropertyAccessorName( getPropertyAccessorName() );
    clone.setSelectable( isSelectable() );
    clone.setUpdateable( isUpdateable() );
    clone.setValue( getValue() );
    return clone;
  }
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

/**
 * create a property copy reusing the same value
 */
public static Property shallowCopy(Property property) {
  Property clone = new Property();
  clone.setCascade( property.getCascade() );
  clone.setInsertable( property.isInsertable() );
  clone.setLazy( property.isLazy() );
  clone.setName( property.getName() );
  clone.setNaturalIdentifier( property.isNaturalIdentifier() );
  clone.setOptimisticLocked( property.isOptimisticLocked() );
  clone.setOptional( property.isOptional() );
  clone.setPersistentClass( property.getPersistentClass() );
  clone.setPropertyAccessorName( property.getPropertyAccessorName() );
  clone.setSelectable( property.isSelectable() );
  clone.setUpdateable( property.isUpdateable() );
  clone.setValue( property.getValue() );
  return clone;
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

/**
 * create a property copy reusing the same value
 */
public static Property shallowCopy(Property property) {
  Property clone = new Property();
  clone.setCascade( property.getCascade() );
  clone.setInsertable( property.isInsertable() );
  clone.setLazy( property.isLazy() );
  clone.setName( property.getName() );
  clone.setNodeName( property.getNodeName() );
  clone.setNaturalIdentifier( property.isNaturalIdentifier() );
  clone.setOptimisticLocked( property.isOptimisticLocked() );
  clone.setOptional( property.isOptional() );
  clone.setPersistentClass( property.getPersistentClass() );
  clone.setPropertyAccessorName( property.getPropertyAccessorName() );
  clone.setSelectable( property.isSelectable() );
  clone.setUpdateable( property.isUpdateable() );
  clone.setValue( property.getValue() );
  return clone;
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

/**
 * create a property copy reusing the same value
 */
public static Property shallowCopy(Property property) {
  Property clone = new Property();
  clone.setCascade( property.getCascade() );
  clone.setInsertable( property.isInsertable() );
  clone.setLazy( property.isLazy() );
  clone.setName( property.getName() );
  clone.setNodeName( property.getNodeName() );
  clone.setNaturalIdentifier( property.isNaturalIdentifier() );
  clone.setOptimisticLocked( property.isOptimisticLocked() );
  clone.setOptional( property.isOptional() );
  clone.setPersistentClass( property.getPersistentClass() );
  clone.setPropertyAccessorName( property.getPropertyAccessorName() );
  clone.setSelectable( property.isSelectable() );
  clone.setUpdateable( property.isUpdateable() );
  clone.setValue( property.getValue() );
  return clone;
}

相关文章

微信公众号

最新文章

更多