Skip to content

Commit

Permalink
Refactoring of EventClass field ecf
Browse files Browse the repository at this point in the history
  • Loading branch information
nocs00 committed Jul 27, 2016
1 parent cae304f commit 09bd9bd
Show file tree
Hide file tree
Showing 12 changed files with 90 additions and 65 deletions.
Expand Up @@ -37,6 +37,7 @@ public class DaoConstants {
public static final String TOPICS_PROPERTY = "topics"; public static final String TOPICS_PROPERTY = "topics";
public static final String CONFIGURATION_SCHEMA_PROPERTY = "configurationSchema"; public static final String CONFIGURATION_SCHEMA_PROPERTY = "configurationSchema";
public static final String ECF_PROPERTY = "ecf"; public static final String ECF_PROPERTY = "ecf";
public static final String ECFV_PROPERTY = "ecfv";
public static final String VERSION_PROPERTY = "version"; public static final String VERSION_PROPERTY = "version";
public static final String SCHEMA_VERSION_PROPERTY = "schemaVersion"; public static final String SCHEMA_VERSION_PROPERTY = "schemaVersion";
public static final String EVENT_CLASS_TYPE_PROPERTY = "type"; public static final String EVENT_CLASS_TYPE_PROPERTY = "type";
Expand All @@ -53,6 +54,7 @@ public class DaoConstants {
public static final String TOPIC_ALIAS = "topic"; public static final String TOPIC_ALIAS = "topic";
public static final String CONFIGURATION_SCHEMA_ALIAS = "configurationSchema"; public static final String CONFIGURATION_SCHEMA_ALIAS = "configurationSchema";
public static final String ECF_ALIAS = "ecf"; public static final String ECF_ALIAS = "ecf";
public static final String ECFV_ALIAS = "ecfv";


public static final String TENANT_REFERENCE = TENANT_ALIAS + "." + ID_PROPERTY; public static final String TENANT_REFERENCE = TENANT_ALIAS + "." + ID_PROPERTY;
public static final String ENDPOINT_PROFILE_SCHEMA_REFERENCE = ENDPOINT_PROFILE_SCHEMA_ALIAS + "." + ID_PROPERTY; public static final String ENDPOINT_PROFILE_SCHEMA_REFERENCE = ENDPOINT_PROFILE_SCHEMA_ALIAS + "." + ID_PROPERTY;
Expand All @@ -64,6 +66,7 @@ public class DaoConstants {
public static final String TOPIC_REFERENCE = TOPIC_ALIAS + "." + ID_PROPERTY; public static final String TOPIC_REFERENCE = TOPIC_ALIAS + "." + ID_PROPERTY;
public static final String CONFIGURATION_SCHEMA_REFERENCE = CONFIGURATION_SCHEMA_ALIAS + "." + ID_PROPERTY; public static final String CONFIGURATION_SCHEMA_REFERENCE = CONFIGURATION_SCHEMA_ALIAS + "." + ID_PROPERTY;
public static final String ECF_REFERENCE = ECF_ALIAS + "." + ID_PROPERTY; public static final String ECF_REFERENCE = ECF_ALIAS + "." + ID_PROPERTY;
public static final String ECFV_REFERENCE = ECFV_ALIAS + "." + ID_PROPERTY;


public static final String OPTIMISTIC_LOCK_PROPERTY = "OPT_LOCK"; public static final String OPTIMISTIC_LOCK_PROPERTY = "OPT_LOCK";


Expand Down
Expand Up @@ -44,6 +44,14 @@ public interface EventClassService {
*/ */
EventClassFamilyDto findEventClassFamilyById(String id); EventClassFamilyDto findEventClassFamilyById(String id);


/**
* Find event class family by ECF version id.
*
* @param id the string id of event class family version
* @return the event class family dto object
*/
EventClassFamilyDto findEventClassFamilyByECFVersionId(String id);

/** /**
* Find event class family versions by id. * Find event class family versions by id.
* *
Expand Down
Expand Up @@ -33,7 +33,7 @@ public interface EventClassDao<T> extends SqlDao<T> {
* @param id the user id * @param id the user id
* @return the list of users * @return the list of users
*/ */
List<T> findByEcfId(String id); List<T> findByEcfvId(String id);


/** /**
* Find all Event Classes by Event Class Family id, version and type. * Find all Event Classes by Event Class Family id, version and type.
Expand All @@ -43,14 +43,14 @@ public interface EventClassDao<T> extends SqlDao<T> {
* @param type the type * @param type the type
* @return the list of event classes * @return the list of event classes
*/ */
List<T> findByEcfIdVersionAndType(String ecfId, int version, EventClassType type); List<T> findByEcfvIdVersionAndType(String ecfId, int version, EventClassType type);


/** /**
* Remove all Event Classes by Event Class Family id. * Remove all Event Classes by Event Class Family id.
* *
* @param tenantId the tenant id * @param tenantId the tenant id
*/ */
void removeByEcfId(String tenantId); void removeByEcfvId(String tenantId);


/** /**
* Find Event Class by Tenant id and FQN. * Find Event Class by Tenant id and FQN.
Expand Down
Expand Up @@ -35,6 +35,9 @@
import static org.kaaproject.kaa.server.common.dao.DaoConstants.ECF_ALIAS; import static org.kaaproject.kaa.server.common.dao.DaoConstants.ECF_ALIAS;
import static org.kaaproject.kaa.server.common.dao.DaoConstants.ECF_PROPERTY; import static org.kaaproject.kaa.server.common.dao.DaoConstants.ECF_PROPERTY;
import static org.kaaproject.kaa.server.common.dao.DaoConstants.ECF_REFERENCE; import static org.kaaproject.kaa.server.common.dao.DaoConstants.ECF_REFERENCE;
import static org.kaaproject.kaa.server.common.dao.DaoConstants.ECFV_ALIAS;
import static org.kaaproject.kaa.server.common.dao.DaoConstants.ECFV_PROPERTY;
import static org.kaaproject.kaa.server.common.dao.DaoConstants.ECFV_REFERENCE;
import static org.kaaproject.kaa.server.common.dao.DaoConstants.EVENT_CLASS_TYPE_PROPERTY; import static org.kaaproject.kaa.server.common.dao.DaoConstants.EVENT_CLASS_TYPE_PROPERTY;
import static org.kaaproject.kaa.server.common.dao.DaoConstants.FQN_PROPERTY; import static org.kaaproject.kaa.server.common.dao.DaoConstants.FQN_PROPERTY;
import static org.kaaproject.kaa.server.common.dao.DaoConstants.TENANT_ALIAS; import static org.kaaproject.kaa.server.common.dao.DaoConstants.TENANT_ALIAS;
Expand All @@ -53,50 +56,50 @@ protected Class<EventClass> getEntityClass() {
} }


@Override @Override
public List<EventClass> findByEcfId(String ecfId) { public List<EventClass> findByEcfvId(String ecfvId) {
List<EventClass> eventClasses = Collections.emptyList(); List<EventClass> eventClasses = Collections.emptyList();
LOG.debug("Searching event classes by ecf id [{}] ", ecfId); LOG.debug("Searching event classes by ecfv id [{}] ", ecfvId);
if (isNotBlank(ecfId)) { if (isNotBlank(ecfvId)) {
eventClasses = findListByCriterionWithAlias(ECF_PROPERTY, ECF_ALIAS, Restrictions.eq(ECF_REFERENCE, Long.valueOf(ecfId))); eventClasses = findListByCriterionWithAlias(ECFV_PROPERTY, ECFV_ALIAS, Restrictions.eq(ECFV_REFERENCE, Long.valueOf(ecfvId)));
} }
if (LOG.isTraceEnabled()) { if (LOG.isTraceEnabled()) {
LOG.trace("[{}] Search result: {}.", ecfId, Arrays.toString(eventClasses.toArray())); LOG.trace("[{}] Search result: {}.", ecfvId, Arrays.toString(eventClasses.toArray()));
} else { } else {
LOG.debug("[{}] Search result: {}.", ecfId, eventClasses.size()); LOG.debug("[{}] Search result: {}.", ecfvId, eventClasses.size());
} }
return eventClasses; return eventClasses;
} }


@Override @Override
public List<EventClass> findByEcfIdVersionAndType(String ecfId, int version, EventClassType type) { public List<EventClass> findByEcfvIdVersionAndType(String ecfvId, int version, EventClassType type) {
LOG.debug("Searching event class by ecf id [{}] version [{}] and type [{}]", ecfId, version, type); LOG.debug("Searching event class by ecfv id [{}] version [{}] and type [{}]", ecfvId, version, type);
List<EventClass> eventClasses = Collections.emptyList(); List<EventClass> eventClasses = Collections.emptyList();
if (isNotBlank(ecfId)) { if (isNotBlank(ecfvId)) {
List<Criterion> predicates = new ArrayList<>(); List<Criterion> predicates = new ArrayList<>();
predicates.add(Restrictions.eq(ECF_REFERENCE, Long.valueOf(ecfId))); predicates.add(Restrictions.eq(ECFV_REFERENCE, Long.valueOf(ecfvId)));
predicates.add(Restrictions.eq(VERSION_PROPERTY, version)); predicates.add(Restrictions.eq(VERSION_PROPERTY, version));
if (type != null) { if (type != null) {
predicates.add(Restrictions.eq(EVENT_CLASS_TYPE_PROPERTY, type)); predicates.add(Restrictions.eq(EVENT_CLASS_TYPE_PROPERTY, type));
} }
eventClasses = findListByCriterionWithAlias(ECF_PROPERTY, ECF_ALIAS, eventClasses = findListByCriterionWithAlias(ECFV_PROPERTY, ECFV_ALIAS,
Restrictions.and(predicates.toArray(new Criterion[]{}))); Restrictions.and(predicates.toArray(new Criterion[]{})));
} }
if (LOG.isTraceEnabled()) { if (LOG.isTraceEnabled()) {
LOG.trace("[{},{},{}] Search result: {}.", ecfId, version, type, Arrays.toString(eventClasses.toArray())); LOG.trace("[{},{},{}] Search result: {}.", ecfvId, version, type, Arrays.toString(eventClasses.toArray()));
} else { } else {
LOG.debug("[{},{},{}] Search result: {}.", ecfId, version, type, eventClasses.size()); LOG.debug("[{},{},{}] Search result: {}.", ecfvId, version, type, eventClasses.size());
} }
return eventClasses; return eventClasses;
} }


@Override @Override
public void removeByEcfId(String ecfId) { public void removeByEcfvId(String ecfvId) {
if (isNotBlank(ecfId)) { if (isNotBlank(ecfvId)) {
List<EventClass> eventClasses = findListByCriterionWithAlias(ECF_PROPERTY, ECF_ALIAS, List<EventClass> eventClasses = findListByCriterionWithAlias(ECFV_PROPERTY, ECFV_ALIAS,
Restrictions.eq(ECF_REFERENCE, Long.valueOf(ecfId))); Restrictions.eq(ECFV_REFERENCE, Long.valueOf(ecfvId)));
removeList(eventClasses); removeList(eventClasses);
} }
LOG.debug("Removed event class by ecf id [{}] ", ecfId); LOG.debug("Removed event class by ecfv id [{}] ", ecfvId);
} }


@Override @Override
Expand Down Expand Up @@ -148,10 +151,10 @@ public boolean validateFqns(String tenantId, String ecfId, List<String> fqns) {
} }
Criteria criteria = getCriteria(); Criteria criteria = getCriteria();
criteria.createAlias(TENANT_PROPERTY, TENANT_ALIAS); criteria.createAlias(TENANT_PROPERTY, TENANT_ALIAS);
criteria.createAlias(ECF_PROPERTY, ECF_ALIAS); criteria.createAlias(ECFV_PROPERTY, ECFV_ALIAS);
criteria.add(Restrictions.and( criteria.add(Restrictions.and(
Restrictions.eq(TENANT_REFERENCE, Long.valueOf(tenantId)), Restrictions.eq(TENANT_REFERENCE, Long.valueOf(tenantId)),
Restrictions.ne(ECF_REFERENCE, Long.valueOf(ecfId)), Restrictions.ne(ECFV_REFERENCE, Long.valueOf(ecfId)),
Restrictions.in(FQN_PROPERTY, fqns))); Restrictions.in(FQN_PROPERTY, fqns)));
eventClasses = findListByCriteria(criteria); eventClasses = findListByCriteria(criteria);
} }
Expand Down
Expand Up @@ -49,7 +49,7 @@ public class EventClass extends BaseSchema<EventClassDto> {


@ManyToOne @ManyToOne
@OnDelete(action = OnDeleteAction.CASCADE) @OnDelete(action = OnDeleteAction.CASCADE)
private EventClassFamilyVersion ecf; private EventClassFamilyVersion ecfv;


@Column(name = EVENT_CLASS_FQN) @Column(name = EVENT_CLASS_FQN)
private String fqn; private String fqn;
Expand Down Expand Up @@ -86,12 +86,12 @@ public void setTenant(Tenant tenant) {
this.tenant = tenant; this.tenant = tenant;
} }


public EventClassFamilyVersion getEcf() { public EventClassFamilyVersion getEcfv() {
return ecf; return ecfv;
} }


public void setEcf(EventClassFamilyVersion ecf) { public void setEcfv(EventClassFamilyVersion ecfv) {
this.ecf = ecf; this.ecfv = ecfv;
} }


public String getFqn() { public String getFqn() {
Expand All @@ -114,7 +114,7 @@ public void setType(EventClassType type) {
public int hashCode() { public int hashCode() {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + ((ecf == null) ? 0 : ecf.hashCode()); result = prime * result + ((ecfv == null) ? 0 : ecfv.hashCode());
result = prime * result + ((fqn == null) ? 0 : fqn.hashCode()); result = prime * result + ((fqn == null) ? 0 : fqn.hashCode());
result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result + ((getCtlSchema() == null) ? 0 : getCtlSchema().hashCode()); result = prime * result + ((getCtlSchema() == null) ? 0 : getCtlSchema().hashCode());
Expand All @@ -135,11 +135,11 @@ public boolean equals(Object obj) {
return false; return false;
} }
EventClass other = (EventClass) obj; EventClass other = (EventClass) obj;
if (ecf == null) { if (ecfv == null) {
if (other.ecf != null) { if (other.ecfv != null) {
return false; return false;
} }
} else if (!ecf.equals(other.ecf)) { } else if (!ecfv.equals(other.ecfv)) {
return false; return false;
} }
if (fqn == null) { if (fqn == null) {
Expand Down Expand Up @@ -197,8 +197,8 @@ public EventClassDto toDto() {
if (tenant != null) { if (tenant != null) {
dto.setTenantId(tenant.getStringId()); dto.setTenantId(tenant.getStringId());
} }
if (ecf != null) { if (ecfv != null) {
dto.setEcfId(ecf.getStringId()); dto.setEcfvId(ecfv.getStringId());
} }
dto.setFqn(fqn); dto.setFqn(fqn);
dto.setType(type); dto.setType(type);
Expand All @@ -209,7 +209,7 @@ public EventClassDto toDto() {


@Override @Override
public String toString() { public String toString() {
return "EventClass [ecf=" + ecf + ", fqn=" + fqn + ", type=" + type + ", ctlSchema=" + getCtlSchema() + ", id=" + id + "]"; return "EventClass [ecfv=" + ecfv + ", fqn=" + fqn + ", type=" + type + ", ctlSchema=" + getCtlSchema() + ", id=" + id + "]";
} }




Expand Down
Expand Up @@ -26,6 +26,7 @@
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors; import java.util.stream.Collectors;


import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
Expand Down Expand Up @@ -97,6 +98,17 @@ public EventClassFamilyDto findEventClassFamilyById(String id) {
return getDto(eventClassFamilyDao.findById(id)); return getDto(eventClassFamilyDao.findById(id));
} }


@Override
public EventClassFamilyDto findEventClassFamilyByECFVersionId(String id) {
validateSqlId(id, "Event class family version id is incorrect. Can't find event class family by ECF version id " + id);

EventClassFamily eventClassFamily = eventClassFamilyDao.find().stream().
filter(ecf -> ecf.getSchemas().stream()
.filter(ecfv -> ecfv.getStringId().equals(id)).count() > 0)
.findFirst().get();
return getDto(eventClassFamily);
}

@Override @Override
public List<EventClassFamilyVersionDto> findEventClassFamilyVersionsById(String id) { public List<EventClassFamilyVersionDto> findEventClassFamilyVersionsById(String id) {
validateSqlId(id, "Event class family id is incorrect. Can't find event class family by id " + id); validateSqlId(id, "Event class family id is incorrect. Can't find event class family by id " + id);
Expand Down Expand Up @@ -191,7 +203,7 @@ private void setEventClassProperties(EventClassFamilyDto eventClassFamilyDto, Ev
} }


private void setBackreference(List<EventClassFamilyVersion> ecfvList) { private void setBackreference(List<EventClassFamilyVersion> ecfvList) {
ecfvList.forEach(ecfv -> ecfv.getRecords().forEach(ec -> ec.setEcf(ecfv))); ecfvList.forEach(ecfv -> ecfv.getRecords().forEach(ec -> ec.setEcfv(ecfv)));
} }


private boolean validateEventClassFamilyFqns(EventClassFamilyDto eventClassFamily, List<String> fqns) { private boolean validateEventClassFamilyFqns(EventClassFamilyDto eventClassFamily, List<String> fqns) {
Expand All @@ -205,7 +217,7 @@ public List<EventClassDto> findEventClassesByFamilyIdVersionAndType(String ecfId
LOG.debug("Find event classes by family id [{}] version [{}] and type [{}]", ecfId, version, type); LOG.debug("Find event classes by family id [{}] version [{}] and type [{}]", ecfId, version, type);
EventClassFamily ecf = eventClassFamilyDao.findById(ecfId); EventClassFamily ecf = eventClassFamilyDao.findById(ecfId);
EventClassFamilyVersion ecfv = ecf.getSchemas().stream().filter(s -> s.getVersion() == version).collect(Collectors.toList()).get(0); EventClassFamilyVersion ecfv = ecf.getSchemas().stream().filter(s -> s.getVersion() == version).collect(Collectors.toList()).get(0);
eventClasses = convertDtoList(eventClassDao.findByEcfIdVersionAndType(String.valueOf(ecfv.getId()), ecfv.getVersion(), type)); eventClasses = convertDtoList(eventClassDao.findByEcfvIdVersionAndType(String.valueOf(ecfv.getId()), ecfv.getVersion(), type));
} else { } else {
throw new IncorrectParameterException("Incorrect event class family id: " + ecfId); throw new IncorrectParameterException("Incorrect event class family id: " + ecfId);
} }
Expand Down
Expand Up @@ -30,7 +30,6 @@
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import java.util.stream.Collectors;


import org.junit.Assert; import org.junit.Assert;
import org.kaaproject.kaa.common.dto.KaaAuthorityDto; import org.kaaproject.kaa.common.dto.KaaAuthorityDto;
Expand All @@ -40,7 +39,6 @@
import org.kaaproject.kaa.common.dto.ctl.CTLSchemaScopeDto; import org.kaaproject.kaa.common.dto.ctl.CTLSchemaScopeDto;
import org.kaaproject.kaa.common.dto.event.ApplicationEventAction; import org.kaaproject.kaa.common.dto.event.ApplicationEventAction;
import org.kaaproject.kaa.common.dto.event.EventClassType; import org.kaaproject.kaa.common.dto.event.EventClassType;
import org.kaaproject.kaa.server.common.core.schema.KaaSchemaFactoryImpl;
import org.kaaproject.kaa.server.common.dao.AbstractTest; import org.kaaproject.kaa.server.common.dao.AbstractTest;
import org.kaaproject.kaa.server.common.dao.model.sql.Application; import org.kaaproject.kaa.server.common.dao.model.sql.Application;
import org.kaaproject.kaa.server.common.dao.model.sql.ApplicationEventFamilyMap; import org.kaaproject.kaa.server.common.dao.model.sql.ApplicationEventFamilyMap;
Expand Down Expand Up @@ -418,7 +416,7 @@ protected List<EventClassFamilyVersion> generateEventClassFamilyVersion(EventCla
} }


ec.setCtlSchema(generateCTLSchema(DEFAULT_FQN, version, eventClassFamily.getTenant(), CTLSchemaScopeDto.TENANT)); ec.setCtlSchema(generateCTLSchema(DEFAULT_FQN, version, eventClassFamily.getTenant(), CTLSchemaScopeDto.TENANT));
ec.setEcf(ecfv); ec.setEcfv(ecfv);
ec.setFqn("Test FQN" + RANDOM.nextInt()); ec.setFqn("Test FQN" + RANDOM.nextInt());
ec.setType(EventClassType.EVENT); ec.setType(EventClassType.EVENT);
ecList.add(ec); ecList.add(ec);
Expand Down
Expand Up @@ -37,15 +37,15 @@
public class HibernateEventClassDaoTest extends HibernateAbstractTest { public class HibernateEventClassDaoTest extends HibernateAbstractTest {


@Test @Test
public void removeByEcfId() { public void removeByEcfvId() {
List<EventClass> eventClasses = generateEventClass(null, null, 2); List<EventClass> eventClasses = generateEventClass(null, null, 2);
String id = eventClasses.get(0).getStringId(); String id = eventClasses.get(0).getStringId();
EventClass dto = eventClassDao.findById(id); EventClass dto = eventClassDao.findById(id);
Assert.assertNotNull(dto); Assert.assertNotNull(dto);
String ecfId = dto.getEcf().getStringId(); String ecfvId = dto.getEcfv().getStringId();
Assert.assertNotNull(ecfId); Assert.assertNotNull(ecfvId);


eventClassDao.removeByEcfId(ecfId); eventClassDao.removeByEcfvId(ecfvId);
dto = eventClassDao.findById(id); dto = eventClassDao.findById(id);
Assert.assertNull(dto); Assert.assertNull(dto);
} }
Expand All @@ -67,7 +67,7 @@ public void findByEcfIdTest() {
List<EventClass> eventClasses = generateEventClass(null, null, 2); List<EventClass> eventClasses = generateEventClass(null, null, 2);
EventClass dto = eventClassDao.findById(eventClasses.get(0).getStringId()); EventClass dto = eventClassDao.findById(eventClasses.get(0).getStringId());
Assert.assertNotNull(dto); Assert.assertNotNull(dto);
List<EventClass> eventClassesList = eventClassDao.findByEcfId(dto.getEcf().getStringId()); List<EventClass> eventClassesList = eventClassDao.findByEcfvId(dto.getEcfv().getStringId());
EventClass eventClass = null; EventClass eventClass = null;
for (EventClass found : eventClassesList) { for (EventClass found : eventClassesList) {
if (dto.getId().equals(found.getId())) { if (dto.getId().equals(found.getId())) {
Expand Down
Expand Up @@ -24,7 +24,7 @@ public class EventClassDto extends BaseSchemaDto {
private static final long serialVersionUID = 2052580632293959408L; private static final long serialVersionUID = 2052580632293959408L;


private String tenantId; private String tenantId;
private String ecfId; private String ecfvId;
private String fqn; private String fqn;
private EventClassType type; private EventClassType type;


Expand All @@ -36,12 +36,12 @@ public void setTenantId(String tenantId) {
this.tenantId = tenantId; this.tenantId = tenantId;
} }


public String getEcfId() { public String getEcfvId() {
return ecfId; return ecfvId;
} }


public void setEcfId(String ecfId) { public void setEcfvId(String ecfvId) {
this.ecfId = ecfId; this.ecfvId = ecfvId;
} }


public String getFqn() { public String getFqn() {
Expand All @@ -64,7 +64,7 @@ public void setType(EventClassType type) {
public int hashCode() { public int hashCode() {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + ((ecfId == null) ? 0 : ecfId.hashCode()); result = prime * result + ((ecfvId == null) ? 0 : ecfvId.hashCode());
result = prime * result + ((fqn == null) ? 0 : fqn.hashCode()); result = prime * result + ((fqn == null) ? 0 : fqn.hashCode());
result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result result = prime * result
Expand All @@ -87,11 +87,11 @@ public boolean equals(Object obj) {
return false; return false;
} }
EventClassDto other = (EventClassDto) obj; EventClassDto other = (EventClassDto) obj;
if (ecfId == null) { if (ecfvId == null) {
if (other.ecfId != null) { if (other.ecfvId != null) {
return false; return false;
} }
} else if (!ecfId.equals(other.ecfId)) { } else if (!ecfvId.equals(other.ecfvId)) {
return false; return false;
} }
if (fqn == null) { if (fqn == null) {
Expand Down Expand Up @@ -136,7 +136,7 @@ public String toString() {
builder.append(", tenantId="); builder.append(", tenantId=");
builder.append(tenantId); builder.append(tenantId);
builder.append(", ecfId="); builder.append(", ecfId=");
builder.append(ecfId); builder.append(ecfvId);
builder.append(", fqn="); builder.append(", fqn=");
builder.append(fqn); builder.append(fqn);
builder.append(", type="); builder.append(", type=");
Expand Down

0 comments on commit 09bd9bd

Please sign in to comment.