rename sourceType
This commit is contained in:
parent
36c17b5853
commit
a0ac8df5ba
|
@ -53,7 +53,7 @@ public class ReferenceEntity {
|
|||
|
||||
@Column(name = "source_type", nullable = false)
|
||||
@Convert(converter = ReferenceSourceTypeConverter.class)
|
||||
private ReferenceSourceType referenceSourceType;
|
||||
private ReferenceSourceType sourceType;
|
||||
public static final String _sourceType = "sourceType";
|
||||
|
||||
@Column(name = "is_active", nullable = false)
|
||||
|
@ -137,12 +137,12 @@ public class ReferenceEntity {
|
|||
this.source = source;
|
||||
}
|
||||
|
||||
public ReferenceSourceType getReferenceSourceType() {
|
||||
return referenceSourceType;
|
||||
public ReferenceSourceType getSourceType() {
|
||||
return sourceType;
|
||||
}
|
||||
|
||||
public void setReferenceSourceType(ReferenceSourceType referenceSourceType) {
|
||||
this.referenceSourceType = referenceSourceType;
|
||||
public void setSourceType(ReferenceSourceType referenceSourceType) {
|
||||
this.sourceType = referenceSourceType;
|
||||
}
|
||||
|
||||
public IsActive getIsActive() {
|
||||
|
|
|
@ -35,7 +35,7 @@ public class Reference {
|
|||
private String source;
|
||||
public static final String _source = "source";
|
||||
|
||||
private ReferenceSourceType referenceSourceType;
|
||||
private ReferenceSourceType sourceType;
|
||||
public static final String _sourceType = "sourceType";
|
||||
|
||||
private IsActive isActive;
|
||||
|
@ -117,12 +117,12 @@ public class Reference {
|
|||
this.source = source;
|
||||
}
|
||||
|
||||
public ReferenceSourceType getReferenceSourceType() {
|
||||
return referenceSourceType;
|
||||
public ReferenceSourceType getSourceType() {
|
||||
return sourceType;
|
||||
}
|
||||
|
||||
public void setReferenceSourceType(ReferenceSourceType referenceSourceType) {
|
||||
this.referenceSourceType = referenceSourceType;
|
||||
public void setSourceType(ReferenceSourceType sourceType) {
|
||||
this.sourceType = sourceType;
|
||||
}
|
||||
|
||||
public IsActive getIsActive() {
|
||||
|
|
|
@ -78,7 +78,7 @@ public class ReferenceBuilder extends BaseBuilder<Reference, ReferenceEntity>{
|
|||
if (fields.hasField(this.asIndexer(Reference._abbreviation))) m.setAbbreviation(d.getAbbreviation());
|
||||
if (fields.hasField(this.asIndexer(Reference._description))) m.setDescription(d.getDescription());
|
||||
if (fields.hasField(this.asIndexer(Reference._source))) m.setSource(d.getSource());
|
||||
if (fields.hasField(this.asIndexer(Reference._sourceType))) m.setReferenceSourceType(d.getReferenceSourceType());
|
||||
if (fields.hasField(this.asIndexer(Reference._sourceType))) m.setSourceType(d.getSourceType());
|
||||
if (fields.hasField(this.asIndexer(Reference._type))) m.setType(d.getType());
|
||||
// if (!userInfoFields.isEmpty() && d.getCreatedBy() != null){
|
||||
// //ToDo
|
||||
|
|
|
@ -18,7 +18,7 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
@Component("referencedefinitionbuilder")
|
||||
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
|
||||
public class DefinitionBuilder extends BaseBuilder<Definition, DefinitionEntity> {
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
@Component("referencedefinitionfieldbuilder")
|
||||
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
|
||||
public class FieldBuilder extends BaseBuilder<Field, FieldEntity> {
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ public class ReferencePersist {
|
|||
private String source;
|
||||
|
||||
@ValidEnum(message = "{validation.empty}")
|
||||
private ReferenceSourceType referenceSourceType;
|
||||
private ReferenceSourceType sourceType;
|
||||
|
||||
//private UserInfoPersist createdBy; ToDo
|
||||
|
||||
|
@ -113,11 +113,11 @@ public class ReferencePersist {
|
|||
this.source = source;
|
||||
}
|
||||
|
||||
public ReferenceSourceType getReferenceSourceType() {
|
||||
return referenceSourceType;
|
||||
public ReferenceSourceType getSourceType() {
|
||||
return sourceType;
|
||||
}
|
||||
|
||||
public void setReferenceSourceType(ReferenceSourceType referenceSourceType) {
|
||||
this.referenceSourceType = referenceSourceType;
|
||||
public void setSourceType(ReferenceSourceType sourceType) {
|
||||
this.sourceType = sourceType;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,17 +73,17 @@ public class ReferenceQuery extends QueryBase<ReferenceEntity> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public ReferenceQuery referenceTypes(ReferenceType value) {
|
||||
public ReferenceQuery types(ReferenceType value) {
|
||||
this.referenceTypes = List.of(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ReferenceQuery referenceTypes(ReferenceType... value) {
|
||||
public ReferenceQuery types(ReferenceType... value) {
|
||||
this.referenceTypes = Arrays.asList(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ReferenceQuery referenceTypes(Collection<ReferenceType> values) {
|
||||
public ReferenceQuery types(Collection<ReferenceType> values) {
|
||||
this.referenceTypes = values;
|
||||
return this;
|
||||
}
|
||||
|
@ -103,17 +103,17 @@ public class ReferenceQuery extends QueryBase<ReferenceEntity> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public ReferenceQuery referenceSourceTypes(ReferenceSourceType value) {
|
||||
public ReferenceQuery sourceTypes(ReferenceSourceType value) {
|
||||
this.referenceSourceTypes = List.of(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ReferenceQuery referenceSourceTypes(ReferenceSourceType... value) {
|
||||
public ReferenceQuery sourceTypes(ReferenceSourceType... value) {
|
||||
this.referenceSourceTypes = Arrays.asList(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ReferenceQuery referenceSourceTypes(Collection<ReferenceSourceType> values) {
|
||||
public ReferenceQuery sourceTypes(Collection<ReferenceSourceType> values) {
|
||||
this.referenceSourceTypes = values;
|
||||
return this;
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ public class ReferenceQuery extends QueryBase<ReferenceEntity> {
|
|||
item.setAbbreviation(QueryBase.convertSafe(tuple, columns, ReferenceEntity._abbreviation, String.class));
|
||||
item.setReference(QueryBase.convertSafe(tuple, columns, ReferenceEntity._reference, String.class));
|
||||
item.setSource(QueryBase.convertSafe(tuple, columns, ReferenceEntity._source, String.class));
|
||||
item.setReferenceSourceType(QueryBase.convertSafe(tuple, columns, ReferenceEntity._sourceType, ReferenceSourceType.class));
|
||||
item.setSourceType(QueryBase.convertSafe(tuple, columns, ReferenceEntity._sourceType, ReferenceSourceType.class));
|
||||
item.setType(QueryBase.convertSafe(tuple, columns, ReferenceEntity._type, ReferenceType.class));
|
||||
item.setCreatedBy(QueryBase.convertSafe(tuple, columns, ReferenceEntity._createdBy, UUID.class));
|
||||
return item;
|
||||
|
|
|
@ -17,9 +17,9 @@ public class ReferenceLookup extends Lookup {
|
|||
|
||||
private List<IsActive> isActive;
|
||||
|
||||
private Collection<ReferenceSourceType> referenceSourceTypes;
|
||||
private Collection<ReferenceSourceType> sourceTypes;
|
||||
|
||||
private Collection<ReferenceType> referenceTypes;
|
||||
private Collection<ReferenceType> types;
|
||||
|
||||
private List<UUID> ids;
|
||||
|
||||
|
@ -57,28 +57,28 @@ public class ReferenceLookup extends Lookup {
|
|||
this.excludedIds = excludeIds;
|
||||
}
|
||||
|
||||
public Collection<ReferenceSourceType> getReferenceSourceTypes() {
|
||||
return referenceSourceTypes;
|
||||
public Collection<ReferenceSourceType> getSourceTypes() {
|
||||
return sourceTypes;
|
||||
}
|
||||
|
||||
public void setReferenceSourceTypes(Collection<ReferenceSourceType> referenceSourceTypes) {
|
||||
this.referenceSourceTypes = referenceSourceTypes;
|
||||
public void setSourceTypes(Collection<ReferenceSourceType> sourceTypes) {
|
||||
this.sourceTypes = sourceTypes;
|
||||
}
|
||||
|
||||
public Collection<ReferenceType> getReferenceTypes() {
|
||||
return referenceTypes;
|
||||
public Collection<ReferenceType> getTypes() {
|
||||
return types;
|
||||
}
|
||||
|
||||
public void setReferenceTypes(Collection<ReferenceType> referenceTypes) {
|
||||
this.referenceTypes = referenceTypes;
|
||||
public void setTypes(Collection<ReferenceType> types) {
|
||||
this.types = types;
|
||||
}
|
||||
|
||||
public ReferenceQuery enrich(QueryFactory queryFactory) {
|
||||
ReferenceQuery query = queryFactory.query(ReferenceQuery.class);
|
||||
if (this.like != null) query.like(this.like);
|
||||
if (this.isActive != null) query.isActive(this.isActive);
|
||||
if (this.referenceTypes != null) query.referenceTypes(this.referenceTypes);
|
||||
if (this.referenceSourceTypes != null) query.referenceSourceTypes(this.referenceSourceTypes);
|
||||
if (this.types != null) query.types(this.types);
|
||||
if (this.sourceTypes != null) query.sourceTypes(this.sourceTypes);
|
||||
if (this.ids != null) query.ids(this.ids);
|
||||
if (this.excludedIds != null) query.excludedIds(this.excludedIds);
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ public class ReferenceService {
|
|||
data.setReference(model.getReference());
|
||||
data.setAbbreviation(model.getAbbreviation());
|
||||
data.setSource(model.getSource());
|
||||
data.setReferenceSourceType(model.getReferenceSourceType());
|
||||
data.setSourceType(model.getSourceType());
|
||||
|
||||
if (isUpdate) this.entityManager.merge(data);
|
||||
else this.entityManager.persist(data);
|
||||
|
|
Loading…
Reference in New Issue