/** * @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; }
@Override @Transient public Long getCodeId() { if (this.code == null) { return null; } return this.code.getId(); }
@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(); } }
@Transient public List<StatisticField> getStatisticFields() { if (stroomStatsStoreDataObject != null) { return stroomStatsStoreDataObject.getStatisticFields(); } else { return Collections.emptyList(); } }
@Override @Transient public Set<? extends CustomRollUpMask> getCustomRollUpMasks() { if (stroomStatsStoreDataObject != null) { return stroomStatsStoreDataObject.getCustomRollUpMasks(); } else { return Collections.emptySet(); } }
/***********************************************************************/ /* Id for DataTables */ @Transient @JsonView(YadaJsonView.WithEagerAttributes.class) @JsonProperty("DT_RowId") public String getDT_RowId() { return this.getClass().getSimpleName()+"#"+this.id; // YadaProduct#142 }
/** * @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; }
@Transient public boolean isEmpty() { if( strings != null ) { for( LanguageString string : strings.values() ) { if( !Check.isEmpty(string.getText()) ) { return false; } } } return true; }
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; } }
/***********************************************************************/ /* DataTables */ @Transient @JsonView(YadaJsonView.WithEagerAttributes.class) @JsonProperty("DT_RowId") public String getDT_RowId() { return this.getClass().getSimpleName()+"#"+this.id; // YadaUserMessage#142 }
@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; }
/** * 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; }
/** * 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(); }
@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; }
@Transient public EssayAnswer copy() { EssayAnswer essayAnswer = new EssayAnswer(); essayAnswer.setAnswer(answer); essayAnswer.save(); return essayAnswer; }
/** * Returns the UUID, or null if not set * @return */ @Transient public UUID getUUID() { if (mostSigBits>0 && leastSigBits>0) { return new UUID(mostSigBits, leastSigBits); } return null; }
@Transient @Override public Boolean getValue() { return value; }
@Override @Transient public final String getValue() { return stringValue; }
@Transient @Override public Date getValue() { return null; }
@Transient @Override public Long getValue() { return longValue; }
@Transient public String getPageUrl() { return pageUrl; }
@Transient public String getImageUrl() { return imageUrl; }
@Transient public Shadow getShadow() { return shadow; }
@Transient public List<QuScore> getQuScores() { return quScores; }
@Transient public List<QuestionLogic> getQuestionLogics() { return questionLogics; }
@Transient public String getLastUpdateTimeStr() { return lastUpdateTimeStr; }
@Transient public int getAnOrderSum() { return anOrderSum; }
/** * Количество услуг, которые обрабатывает юзер. // едет на коиента при логине */ @Transient public int getServicesCnt() { return servicesCnt; }
@Transient public SurveyDetail getSurveyDetail() { return surveyDetail; }
@Transient public List<Question> getQuestions() { return questions; }
@Transient public int getStatisticFieldCount() { return stroomStatsStoreDataObject == null ? 0 : stroomStatsStoreDataObject.getStatisticFields().size(); }
@Transient @Override public int hashCode() { return Objects.hashCode(this.enumClassName, this.enumOrdinal); }
@Transient public String[] getRemoveOptionUuIds() { return removeOptionUuIds; }
/** * Reset the entity id and version to its undefined state so that it is non * persistent. This is often useful when copying an entity using copy. */ @Transient public void clearPersistence() { setId(UNDEFINED_ID); version = -1; }
@Transient public int getAnCount() { return anCount; }
@Transient public abstract boolean isPersistent();
@Transient public abstract Object getPrimaryKey();
@Transient @Override public String getDisplayValue() { return String.valueOf(getName()); }
@Transient public String getFindPwdUrl() { return findPwdUrl; }
@Transient public String getDynamicTableName() { return dynamicTableName123; }