本文整理汇总了Java中javax.persistence.Transient类的典型用法代码示例。如果您正苦于以下问题:Java Transient类的具体用法?Java Transient怎么用?Java Transient使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Transient类属于javax.persistence包,在下文中一共展示了Transient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPartitionsAsSet
import javax.persistence.Transient; //导入依赖的package包/类
/**
* @return Returns the defined partitions as a Set.
*/
@Transient
public Set<Integer> getPartitionsAsSet() {
final Set<Integer> partitionsSet = new HashSet<>();
// Avoid NPE.
if (getPartitions() == null) {
return partitionsSet;
}
final String[] partitions = getPartitions().split(",");
for (final String partitionStr: partitions) {
try {
partitionsSet.add(Integer.parseInt(partitionStr));
} catch (NumberFormatException e) {
// Ignore?
}
}
return partitionsSet;
}
示例2: getCodeId
import javax.persistence.Transient; //导入依赖的package包/类
@Override
@Transient
public Long getCodeId() {
if (this.code == null) {
return null;
}
return this.code.getId();
}
示例3: getFieldNames
import javax.persistence.Transient; //导入依赖的package包/类
@Override
@Transient
public List<String> getFieldNames() {
if (stroomStatsStoreDataObject != null) {
final List<String> fieldNames = new ArrayList<String>();
for (final StatisticField statisticField : stroomStatsStoreDataObject.getStatisticFields()) {
fieldNames.add(statisticField.getFieldName());
}
return fieldNames;
} else {
return Collections.emptyList();
}
}
示例4: getStatisticFields
import javax.persistence.Transient; //导入依赖的package包/类
@Transient
public List<StatisticField> getStatisticFields() {
if (stroomStatsStoreDataObject != null) {
return stroomStatsStoreDataObject.getStatisticFields();
} else {
return Collections.emptyList();
}
}
示例5: getCustomRollUpMasks
import javax.persistence.Transient; //导入依赖的package包/类
@Override
@Transient
public Set<? extends CustomRollUpMask> getCustomRollUpMasks() {
if (stroomStatsStoreDataObject != null) {
return stroomStatsStoreDataObject.getCustomRollUpMasks();
} else {
return Collections.emptySet();
}
}
示例6: getDT_RowId
import javax.persistence.Transient; //导入依赖的package包/类
/***********************************************************************/
/* Id for DataTables */
@Transient
@JsonView(YadaJsonView.WithEagerAttributes.class)
@JsonProperty("DT_RowId")
public String getDT_RowId() {
return this.getClass().getSimpleName()+"#"+this.id; // YadaProduct#142
}
示例7: getOptionsAsSet
import javax.persistence.Transient; //导入依赖的package包/类
/**
* @return All of the option names, as a set.
*/
@Transient
public Set<String> getOptionsAsSet() {
final Set<String> set = new HashSet<>();
Collections.addAll(set, getOptions().split(","));
return set;
}
示例8: isEmpty
import javax.persistence.Transient; //导入依赖的package包/类
@Transient
public boolean isEmpty()
{
if( strings != null )
{
for( LanguageString string : strings.values() )
{
if( !Check.isEmpty(string.getText()) )
{
return false;
}
}
}
return true;
}
示例9: getTransient
import javax.persistence.Transient; //导入依赖的package包/类
private Transient getTransient(XMLContext.Default defaults) {
for ( Element element : elementsForProperty ) {
if ( "transient".equals( element.getName() ) ) {
AnnotationDescriptor ad = new AnnotationDescriptor( Transient.class );
return AnnotationFactory.create( ad );
}
}
if ( elementsForProperty.size() == 0 && defaults.canUseJavaAnnotations() ) {
return getPhysicalAnnotation( Transient.class );
}
else {
return null;
}
}
示例10: getDT_RowId
import javax.persistence.Transient; //导入依赖的package包/类
/***********************************************************************/
/* DataTables */
@Transient
@JsonView(YadaJsonView.WithEagerAttributes.class)
@JsonProperty("DT_RowId")
public String getDT_RowId() {
return this.getClass().getSimpleName()+"#"+this.id; // YadaUserMessage#142
}
示例11: getPrivateUrl
import javax.persistence.Transient; //导入依赖的package包/类
@Transient
public String getPrivateUrl() {
String publicUrl = "";
if (this.getS3ThumbFileName() != null && this.getS3ThumbFileName().trim().length() > 0)
publicUrl = MessageFormat.format(Configuration.PRIVATE_MEDIA_URL_FORMAT.toString(), this.getId());
return publicUrl;
}
示例12: getLocalDescription
import javax.persistence.Transient; //导入依赖的package包/类
/**
* Fetches the localized description for the current request locale or the default configured locale
* @return the name or the empty string if no value has been defined
*/
@Transient
public String getLocalDescription() {
if (cacheDescription==null) {
cacheDescription = yadaLocaleDao.getLocalValue(id, YadaProduct.class, "description", null);
}
return cacheDescription;
}
示例13: setEnum
import javax.persistence.Transient; //导入依赖的package包/类
/**
* Sets the attributes of a normal enum into this instance, but not the localized text
* @param enumValue
*/
@Transient
public void setEnum(E enumValue) {
this.enumClassName = enumValue.getClass().getName();
this.enumOrdinal = enumValue.ordinal();
this.enumName = enumValue.name();
}
示例14: copy
import javax.persistence.Transient; //导入依赖的package包/类
@Transient
public AutoEvaluationConfig copy() {
AutoEvaluationConfig clone = new AutoEvaluationConfig();
BeanUtils.copyProperties(this, clone, "id", "exam", "gradeEvaluations");
for (GradeEvaluation ge : gradeEvaluations) {
clone.getGradeEvaluations().add(ge.copy());
}
return clone;
}
示例15: copy
import javax.persistence.Transient; //导入依赖的package包/类
@Transient
public EssayAnswer copy() {
EssayAnswer essayAnswer = new EssayAnswer();
essayAnswer.setAnswer(answer);
essayAnswer.save();
return essayAnswer;
}