ilscipio/scipio-erp

View on GitHub
framework/entity/src/org/ofbiz/entity/GenericEntity.java

Summary

Maintainability
F
4 days
Test Coverage

GenericEntity has 178 methods (exceeds 20 allowed). Consider refactoring.
Open

@SuppressWarnings("serial")
public class GenericEntity implements ScipioMap<String, Object>, LocalizedMap<Object>, Serializable, Comparable<GenericEntity>, Cloneable {

    private static final Debug.OfbizLogger module = Debug.getOfbizLogger(java.lang.invoke.MethodHandles.lookup().lookupClass());
    public static final GenericEntity NULL_ENTITY = new NullGenericEntity();
Severity: Major
Found in framework/entity/src/org/ofbiz/entity/GenericEntity.java - About 3 days to fix

    Avoid deeply nested control flow statements.
    Open

                            if (memberModelEntity.getEntityName().equals(modelEntityToUse.getEntityName())) {
                                pkName = aliasField.getName();
                                break;
                            }
    Severity: Major
    Found in framework/entity/src/org/ofbiz/entity/GenericEntity.java - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              for (ModelKeyMap mkm : relation.getKeyMaps()) {
                                  if (this.get(mkm.getFieldName()) != null) {
                                      newValue.set(mkm.getRelFieldName(), this.get(mkm.getFieldName()));
                                      if (Debug.infoOn()) {
                                          Debug.logInfo("Set [" + mkm.getRelFieldName() + "] to - " + this.get(mkm.getFieldName()), module);
      Severity: Major
      Found in framework/entity/src/org/ofbiz/entity/GenericEntity.java - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if (allFieldsSet) {
                                    if (Debug.infoOn()) {
                                        Debug.logInfo("Creating place holder value : " + newValue, module);
                                    }
        
        
        Severity: Major
        Found in framework/entity/src/org/ofbiz/entity/GenericEntity.java - About 45 mins to fix

          Method setAllFields has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public void setAllFields(Map<?, ?> fields, Boolean setIfEmpty, String namePrefix, Boolean pks, SetOptions options) {
          Severity: Minor
          Found in framework/entity/src/org/ofbiz/entity/GenericEntity.java - About 35 mins to fix

            Method get has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                private Object get(ModelEntity modelEntity, ModelEntity modelEntityToUse, String name, String resource, Locale locale) {
            Severity: Minor
            Found in framework/entity/src/org/ofbiz/entity/GenericEntity.java - About 35 mins to fix

              Avoid too many return statements within this method.
              Open

                      return tempResult;
              Severity: Major
              Found in framework/entity/src/org/ofbiz/entity/GenericEntity.java - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                            return wrapper.getBytes();
                Severity: Major
                Found in framework/entity/src/org/ofbiz/entity/GenericEntity.java - About 30 mins to fix

                  There are no issues that match your filters.

                  Category
                  Status