當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。