org.hibernate.Criteria.isReadOnlyInitialized()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(134)

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

Criteria.isReadOnlyInitialized介绍

[英]Was the read-only/modifiable mode explicitly initialized?
[中]只读/可修改模式是否已显式初始化?

代码示例

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

assertFalse( s.isReadOnly( coursePreferred ) );
Criteria criteria = s.createCriteria( Student.class ).setReadOnly( true );
assertTrue( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
gavin = ( Student ) criteria.uniqueResult();
assertFalse( s.isDefaultReadOnly() );
assertTrue( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
assertTrue( s.isReadOnly( gavin ) );

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

s.setReadOnly( coursePreferred, true );
Criteria criteria = s.createCriteria( Student.class ).setReadOnly( false );
assertTrue( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
gavin = ( Student ) criteria.uniqueResult();
assertFalse( s.isDefaultReadOnly() );
assertTrue( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
assertFalse( s.isReadOnly( gavin ) );

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

Criteria criteria = s.createCriteria( Student.class );
assertFalse( s.isDefaultReadOnly() );
assertFalse( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
criteria.setReadOnly( false );
assertTrue( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
gavin = ( Student ) criteria.uniqueResult();
assertFalse( s.isDefaultReadOnly() );
assertTrue( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
assertFalse( s.isReadOnly( gavin ) );

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

checkProxyReadOnly( s, coursePreferred, false );
Criteria criteria = s.createCriteria( Student.class ).setReadOnly( true );
assertTrue( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
gavin = ( Student ) criteria.uniqueResult();
assertFalse( s.isDefaultReadOnly() );
assertTrue( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
assertTrue( s.isReadOnly( gavin ) );

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

Criteria criteria = s.createCriteria( Student.class );
assertTrue( s.isDefaultReadOnly() );
assertFalse( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
criteria.setReadOnly( true );
assertTrue( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
gavin = ( Student ) criteria.uniqueResult();
assertTrue( s.isDefaultReadOnly() );
assertTrue( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
assertTrue( s.isReadOnly( gavin ) );

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

checkProxyReadOnly( s, coursePreferred, true );
Criteria criteria = s.createCriteria( Student.class ).setReadOnly( false );
assertTrue( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
gavin = ( Student ) criteria.uniqueResult();
assertFalse( s.isDefaultReadOnly() );
assertTrue( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
assertFalse( s.isReadOnly( gavin ) );

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

Criteria criteria = s.createCriteria( Student.class ).setReadOnly( true );
assertFalse( s.isDefaultReadOnly() );
assertTrue( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
gavin = ( Student ) criteria.uniqueResult();
assertFalse( s.isDefaultReadOnly() );
assertTrue( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
assertTrue( s.isReadOnly( gavin ) );

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

checkProxyReadOnly( s, coursePreferred, false );
Criteria criteria = s.createCriteria( Student.class ).setReadOnly( true );
assertTrue( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
gavin = ( Student ) criteria.uniqueResult();
assertFalse( s.isDefaultReadOnly() );
assertTrue( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
assertTrue( s.isReadOnly( gavin ) );

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

Criteria criteria = s.createCriteria( Student.class );
assertTrue( s.isDefaultReadOnly() );
assertFalse( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
criteria.setReadOnly( false );
assertTrue( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
gavin = ( Student ) criteria.uniqueResult();
assertTrue( s.isDefaultReadOnly() );
assertTrue( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
assertFalse( s.isReadOnly( gavin ) );

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

Criteria criteria = s.createCriteria( Student.class );
assertTrue( s.isDefaultReadOnly() );
assertFalse( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
gavin = ( Student ) criteria.uniqueResult();
assertTrue( s.isDefaultReadOnly() );
assertFalse( criteria.isReadOnlyInitialized() );
assertTrue( criteria.isReadOnly() );
assertTrue( s.isReadOnly( gavin ) );

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

checkProxyReadOnly( s, coursePreferred, true );
Criteria criteria = s.createCriteria( Student.class ).setReadOnly( false );
assertTrue( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
gavin = ( Student ) criteria.uniqueResult();
assertFalse( s.isDefaultReadOnly() );
assertTrue( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
assertFalse( s.isReadOnly( gavin ) );

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

Criteria criteria = s.createCriteria( Student.class );
assertFalse( s.isDefaultReadOnly() );
assertFalse( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
gavin = ( Student ) criteria.uniqueResult();
assertFalse( s.isDefaultReadOnly() );
assertFalse( criteria.isReadOnlyInitialized() );
assertFalse( criteria.isReadOnly() );
assertFalse( s.isReadOnly( gavin ) );

代码示例来源:origin: TGAC/miso-lims

@Override
public boolean isReadOnlyInitialized() {
 return backingCriteria.isReadOnlyInitialized();
}

代码示例来源:origin: ezbz/projectx

@Override
public boolean isReadOnlyInitialized() {
 return criteria.isReadOnlyInitialized();
}

相关文章