本文整理汇总了Java中javax.persistence.SharedCacheMode.valueOf方法的典型用法代码示例。如果您正苦于以下问题:Java SharedCacheMode.valueOf方法的具体用法?Java SharedCacheMode.valueOf怎么用?Java SharedCacheMode.valueOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.persistence.SharedCacheMode
的用法示例。
在下文中一共展示了SharedCacheMode.valueOf方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSharedCacheMode
import javax.persistence.SharedCacheMode; //导入方法依赖的package包/类
@Override
public SharedCacheMode getSharedCacheMode() {
if (definition.cachingType.isEmpty()) {
return SharedCacheMode.UNSPECIFIED;
}
return SharedCacheMode.valueOf(definition.cachingType);
}
示例2: getSharedCacheMode
import javax.persistence.SharedCacheMode; //导入方法依赖的package包/类
@Override
public SharedCacheMode getSharedCacheMode() {
PersistenceUnitCachingType sharedCacheMode = persistenceUnitXml.getSharedCacheMode();
if (sharedCacheMode == null) {
return null;
}
return SharedCacheMode.valueOf(sharedCacheMode.name());
}
示例3: getSharedCacheMode
import javax.persistence.SharedCacheMode; //导入方法依赖的package包/类
@Override
public SharedCacheMode getSharedCacheMode() {
PersistenceUnitCachingType sharedCacheMode = persistenceUnitXml.getSharedCacheMode();
if (sharedCacheMode == null)
return null;
return SharedCacheMode.valueOf(sharedCacheMode.name());
}
示例4: possible
import javax.persistence.SharedCacheMode; //导入方法依赖的package包/类
@ManagedOperation
@Description("change the shared cache mode if possible (value is ok)")
public void setSharedCacheMode(final String value) {
try {
final String v = value.trim().toUpperCase();
final SharedCacheMode mode = v.isEmpty() ? SharedCacheMode.UNSPECIFIED : SharedCacheMode.valueOf(v);
reloadableEntityManagerFactory.setSharedCacheMode(mode);
} catch (final Exception iae) {
// ignored
}
}
示例5: getSharedCacheMode
import javax.persistence.SharedCacheMode; //导入方法依赖的package包/类
@Override
public SharedCacheMode getSharedCacheMode() {
String s = (String) parsedPersistenceUnit.getPersistenceXmlMetadata().get(
ParsedPersistenceUnit.SHARED_CACHE_MODE);
if (s == null) {
return SharedCacheMode.UNSPECIFIED;
} else {
return SharedCacheMode.valueOf(s);
}
}