org.hibernate.property.Getter.getForInsert()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(102)

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

Getter.getForInsert介绍

[英]Get the property value from the given owner instance.
[中]从给定的所有者实例获取属性值。

代码示例

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

public Object[] getPropertyValuesToInsert(Object entity, SessionImplementor session) 
throws HibernateException {
  final int span = entityMetamodel.getPropertySpan();
  final Object[] result = new Object[span];
  for ( int j = 0; j < span; j++ ) {
    result[j] = getters[j].getForInsert( entity, session );
  }
  return result;
}

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

public Object[] getPropertyValuesToInsert(Object entity, Map mergeMap, SessionImplementor session)
throws HibernateException {
  final int span = entityMetamodel.getPropertySpan();
  final Object[] result = new Object[span];
  for ( int j = 0; j < span; j++ ) {
    result[j] = getters[j].getForInsert( entity, mergeMap, session );
  }
  return result;
}

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

public Object[] getPropertyValuesToInsert(Object entity, Map mergeMap, SessionImplementor session)
throws HibernateException {
  final int span = entityMetamodel.getPropertySpan();
  final Object[] result = new Object[span];
  for ( int j = 0; j < span; j++ ) {
    result[j] = getters[j].getForInsert( entity, mergeMap, session );
  }
  return result;
}

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

@Ignore("need to convert, was originally written for the old value holder design (TextString, etc)")
@Test
public void testGetter() {
  obj.setString(expected);
  NakedPropertyAccessor accessor = new NakedPropertyAccessor();
  Getter getter = accessor.getGetter(SimpleObject.class, "string");
  assertEquals("string", expected, getter.get(obj));
  assertEquals("string", expected, getter.getForInsert(obj, null, null));
}

相关文章