framework/entity/src/org/ofbiz/entity/model/ModelEntityChecker.java
Avoid deeply nested control flow statements. Open
Open
if (fkNames.contains(index.getName())) {
warningList.add("[IndexFKDupName] Index on entity "
+ entity.getEntityName()
+ " has an index-name \""
+ index.getName()
Avoid deeply nested control flow statements. Open
Open
if (indexNames.contains(index.getName())) {
warningList.add("[IndexDuplicateName] Index on entity "
+ entity.getEntityName() + " has a duplicate index-name \""
+ index.getName() + "\".");
} else {
Avoid deeply nested control flow statements. Open
Open
if (tableNames.contains(index.getName())) {
warningList.add("[IndexTableDupName] Index on entity "
+ entity.getEntityName() + " has an index-name \""
+ index.getName() + "\" that is also being used as a table name.");
}
Avoid deeply nested control flow statements. Open
Open
if (relation.getFkName().length() > 0) {
if (fkNames.contains(relation.getFkName())) {
warningList.add("[RelationFkDuplicate] Relation to "+ relation.getRelEntityName()
+ " from entity " + entity.getEntityName() + " has a duplicate fk-name \""
+ relation.getFkName() + "\".");
Avoid deeply nested control flow statements. Open
Open
if (!entityNames.contains(relation.getRelEntityName())) {
warningList.add("[RelatedEntityNotFound] Related entity " + relation.getRelEntityName()
+ " of entity " + entity.getEntityName() + " not found.");
}
Avoid deeply nested control flow statements. Open
Open
for (ModelKeyMap keyMap : relation.getKeyMaps()) {
ModelField field = entity.getField(keyMap.getFieldName());
ModelField rfield = null;
if (relatedEntity != null) {
Avoid deeply nested control flow statements. Open
Open
if (helperName == null) {
warningMsg.append(" (no helper definition found)");
}
Avoid deeply nested control flow statements. Open
Open
if (index.getName().length() > 18) {
warningList.add("[IndexNameGT18] The index name " + index.getName() + " (length:" + index.getName().length()
+ ") was greater than 18 characters in length for entity " + entity.getEntityName() + ".");
}
Avoid deeply nested control flow statements. Open
Open
if (relations.contains(relation.getTitle() + relation.getRelEntityName())) {
warningList.add("[RelationNameNotUnique] Relation " + relation.getTitle() + relation.getRelEntityName()
+ " of entity "+ entity.getEntityName() + " is not unique for that entity.");
} else {
relations.add(relation.getTitle() + relation.getRelEntityName());
Avoid deeply nested control flow statements. Open
Open
if (relatedEntity != null) {
//if relation is of type one, make sure keyMaps
// match the PK of the relatedEntity
if ("one".equals(relation.getType()) || "one-nofk".equals(relation.getType())) {
if (relatedEntity.getPksSize() != relation.getKeyMaps().size())
Avoid deeply nested control flow statements. Open
Open
if (relation.getFkName().length() > 18) {
warningList.add("[RelFKNameGT18] The foreign key named " + relation.getFkName()
+ " (length:" + relation.getFkName().length()
+ ") was greater than 18 characters in length for relation " + relation.getTitle() + relation.getRelEntityName()
+ " of entity " + entity.getEntityName() + ".");