本文整理匯總了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;
}