当前位置: 首页>>代码示例>>Java>>正文


Java Transient类代码示例

本文整理汇总了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;
}
 
开发者ID:SourceLabOrg,项目名称:kafka-webview,代码行数:24,代码来源:View.java

示例2: getCodeId

import javax.persistence.Transient; //导入依赖的package包/类
@Override
@Transient
public Long getCodeId() {

  if (this.code == null) {
    return null;
  }
  return this.code.getId();
}
 
开发者ID:oasp,项目名称:oasp-tutorial-sources,代码行数:10,代码来源:VisitorEntity.java

示例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();
    }
}
 
开发者ID:gchq,项目名称:stroom-stats,代码行数:14,代码来源:StroomStatsStoreEntity.java

示例4: getStatisticFields

import javax.persistence.Transient; //导入依赖的package包/类
@Transient
public List<StatisticField> getStatisticFields() {
    if (stroomStatsStoreDataObject != null) {
        return stroomStatsStoreDataObject.getStatisticFields();
    } else {
        return Collections.emptyList();
    }
}
 
开发者ID:gchq,项目名称:stroom-stats,代码行数:9,代码来源:StroomStatsStoreEntity.java

示例5: getCustomRollUpMasks

import javax.persistence.Transient; //导入依赖的package包/类
@Override
@Transient
public Set<? extends CustomRollUpMask> getCustomRollUpMasks() {
    if (stroomStatsStoreDataObject != null) {
        return stroomStatsStoreDataObject.getCustomRollUpMasks();
    } else {
        return Collections.emptySet();
    }
}
 
开发者ID:gchq,项目名称:stroom-stats,代码行数:10,代码来源:StroomStatsStoreEntity.java

示例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
}
 
开发者ID:xtianus,项目名称:yadaframework,代码行数:10,代码来源:YadaProduct.java

示例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;
}
 
开发者ID:SourceLabOrg,项目名称:kafka-webview,代码行数:10,代码来源:Filter.java

示例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;
}
 
开发者ID:equella,项目名称:Equella,代码行数:16,代码来源:LanguageBundle.java

示例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;
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:JPAOverriddenAnnotationReader.java

示例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
}
 
开发者ID:xtianus,项目名称:yadaframework,代码行数:10,代码来源:YadaUserMessage.java

示例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;
}
 
开发者ID:awslabs,项目名称:aws-photosharing-example,代码行数:9,代码来源:Media.java

示例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;
}
 
开发者ID:xtianus,项目名称:yadaframework,代码行数:12,代码来源:YadaProduct.java

示例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();
}
 
开发者ID:xtianus,项目名称:yadaframework,代码行数:11,代码来源:YadaPersistentEnum.java

示例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;
}
 
开发者ID:CSCfi,项目名称:exam,代码行数:10,代码来源:AutoEvaluationConfig.java

示例15: copy

import javax.persistence.Transient; //导入依赖的package包/类
@Transient
public EssayAnswer copy() {
    EssayAnswer essayAnswer = new EssayAnswer();
    essayAnswer.setAnswer(answer);
    essayAnswer.save();
    return essayAnswer;
}
 
开发者ID:CSCfi,项目名称:exam,代码行数:8,代码来源:EssayAnswer.java


注:本文中的javax.persistence.Transient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。