The following issues were found

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallAftersaleExample.java
64 issues
Avoid throwing raw exception types.
Design

Line: 245

              
        protected void addPicturesCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            picturesCriteria.add(new Criterion(condition, value, "org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 253

              
        protected void addPicturesCriterion(String condition, String[] value1, String[] value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            picturesCriteria.add(new Criterion(condition, value1, value2, "org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 279

              
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 287

              
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 295

              
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
            allCriteria = null;
        }


            

Reported by PMD.

This class has a bunch of public methods and attributes
Design

Line: 1

              package org.linlinjava.litemall.db.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class LitemallAftersaleExample {
    /**

            

Reported by PMD.

Avoid really long classes.
Design

Line: 8

              import java.util.ArrayList;
import java.util.List;

public class LitemallAftersaleExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_aftersale
     *
     * @mbg.generated

            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 31

                   *
     * @mbg.generated
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table litemall_aftersale
     *

            

Reported by PMD.

Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty()
Design

Line: 152

                   */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }


            

Reported by PMD.

Assigning an Object to null is a code smell. Consider refactoring.
Error

Line: 177

                   */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * This method was generated by MyBatis Generator.

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallOrderExample.java
63 issues
Avoid throwing raw exception types.
Design

Line: 248

              
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {

            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 255

              
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {

            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 262

              
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {

            

Reported by PMD.

This class has a bunch of public methods and attributes
Design

Line: 1

              package org.linlinjava.litemall.db.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class LitemallOrderExample {
    /**

            

Reported by PMD.

The class 'LitemallOrderExample' has a NCSS line count of 1894 (Highest = 8).
Design

Line: 8

              import java.util.ArrayList;
import java.util.List;

public class LitemallOrderExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_order
     *
     * @mbg.generated

            

Reported by PMD.

The type has an NCSS line count of 1894
Design

Line: 8

              import java.util.ArrayList;
import java.util.List;

public class LitemallOrderExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_order
     *
     * @mbg.generated

            

Reported by PMD.

Avoid really long classes.
Design

Line: 8

              import java.util.ArrayList;
import java.util.List;

public class LitemallOrderExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_order
     *
     * @mbg.generated

            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 31

                   *
     * @mbg.generated
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table litemall_order
     *

            

Reported by PMD.

Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty()
Design

Line: 152

                   */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }


            

Reported by PMD.

Assigning an Object to null is a code smell. Consider refactoring.
Error

Line: 177

                   */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * This method was generated by MyBatis Generator.

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallCommentExample.java
62 issues
Avoid throwing raw exception types.
Design

Line: 244

              
        protected void addPicUrlsCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            picUrlsCriteria.add(new Criterion(condition, value, "org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 252

              
        protected void addPicUrlsCriterion(String condition, String[] value1, String[] value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            picUrlsCriteria.add(new Criterion(condition, value1, value2, "org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 278

              
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 286

              
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 294

              
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
            allCriteria = null;
        }


            

Reported by PMD.

This class has a bunch of public methods and attributes
Design

Line: 1

              package org.linlinjava.litemall.db.domain;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class LitemallCommentExample {
    /**
     * This field was generated by MyBatis Generator.

            

Reported by PMD.

Avoid really long classes.
Design

Line: 7

              import java.util.ArrayList;
import java.util.List;

public class LitemallCommentExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_comment
     *
     * @mbg.generated

            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 30

                   *
     * @mbg.generated
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table litemall_comment
     *

            

Reported by PMD.

Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty()
Design

Line: 151

                   */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }


            

Reported by PMD.

Assigning an Object to null is a code smell. Consider refactoring.
Error

Line: 176

                   */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * This method was generated by MyBatis Generator.

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallFeedbackExample.java
62 issues
Avoid throwing raw exception types.
Design

Line: 244

              
        protected void addPicUrlsCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            picUrlsCriteria.add(new Criterion(condition, value, "org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 252

              
        protected void addPicUrlsCriterion(String condition, String[] value1, String[] value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            picUrlsCriteria.add(new Criterion(condition, value1, value2, "org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 278

              
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 286

              
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 294

              
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
            allCriteria = null;
        }


            

Reported by PMD.

This class has a bunch of public methods and attributes
Design

Line: 1

              package org.linlinjava.litemall.db.domain;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class LitemallFeedbackExample {
    /**
     * This field was generated by MyBatis Generator.

            

Reported by PMD.

Avoid really long classes.
Design

Line: 7

              import java.util.ArrayList;
import java.util.List;

public class LitemallFeedbackExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_feedback
     *
     * @mbg.generated

            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 30

                   *
     * @mbg.generated
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table litemall_feedback
     *

            

Reported by PMD.

Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty()
Design

Line: 151

                   */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }


            

Reported by PMD.

Assigning an Object to null is a code smell. Consider refactoring.
Error

Line: 176

                   */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * This method was generated by MyBatis Generator.

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallTopicExample.java
61 issues
Avoid throwing raw exception types.
Design

Line: 245

              
        protected void addGoodsCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            goodsCriteria.add(new Criterion(condition, value, "org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler"));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 253

              
        protected void addGoodsCriterion(String condition, Integer[] value1, Integer[] value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            goodsCriteria.add(new Criterion(condition, value1, value2, "org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler"));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 279

              
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 287

              
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 295

              
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
            allCriteria = null;
        }


            

Reported by PMD.

This class has a bunch of public methods and attributes
Design

Line: 1

              package org.linlinjava.litemall.db.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class LitemallTopicExample {
    /**

            

Reported by PMD.

Avoid really long classes.
Design

Line: 8

              import java.util.ArrayList;
import java.util.List;

public class LitemallTopicExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_topic
     *
     * @mbg.generated

            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 31

                   *
     * @mbg.generated
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table litemall_topic
     *

            

Reported by PMD.

Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty()
Design

Line: 152

                   */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }


            

Reported by PMD.

Assigning an Object to null is a code smell. Consider refactoring.
Error

Line: 177

                   */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * This method was generated by MyBatis Generator.

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallStorage.java
61 issues
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 416

                   * @mbg.generated
     */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_storage

            

Reported by PMD.

Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 417

                   */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_storage
         *

            

Reported by PMD.

The class 'LitemallStorage' is suspected to be a Data Class (WOC=18.182%, NOPA=2, NOAM=18, WMC=44)
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallStorage {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_storage
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallStorage' has a Modified Cyclomatic Complexity of 2 (Highest = 13).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallStorage {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_storage
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallStorage' has a Standard Cyclomatic Complexity of 2 (Highest = 13).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallStorage {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_storage
     *
     * @mbg.generated

            

Reported by PMD.

Potential violation of Law of Demeter (static property access)
Design

Line: 304

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_storage.deleted

            

Reported by PMD.

Potential violation of Law of Demeter (static property access)
Design

Line: 304

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_storage.deleted

            

Reported by PMD.

StringBuffer constructor is initialized with size 16, but has at least 108 characters appended.
Performance

Line: 339

                   */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);

            

Reported by PMD.

StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable.
Performance

Line: 340

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

Potential violation of Law of Demeter (method chain calls)
Design

Line: 340

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallKeyword.java
60 issues
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 416

                   * @mbg.generated
     */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_keyword

            

Reported by PMD.

Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 417

                   */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_keyword
         *

            

Reported by PMD.

The class 'LitemallKeyword' has a Modified Cyclomatic Complexity of 2 (Highest = 13).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallKeyword {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_keyword
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallKeyword' is suspected to be a Data Class (WOC=18.182%, NOPA=2, NOAM=18, WMC=44)
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallKeyword {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_keyword
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallKeyword' has a Standard Cyclomatic Complexity of 2 (Highest = 13).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallKeyword {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_keyword
     *
     * @mbg.generated

            

Reported by PMD.

Potential violation of Law of Demeter (static property access)
Design

Line: 304

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_keyword.deleted

            

Reported by PMD.

Potential violation of Law of Demeter (static property access)
Design

Line: 304

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_keyword.deleted

            

Reported by PMD.

StringBuffer constructor is initialized with size 16, but has at least 123 characters appended.
Performance

Line: 339

                   */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);

            

Reported by PMD.

Potential violation of Law of Demeter (method chain calls)
Design

Line: 340

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable.
Performance

Line: 340

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallAdminExample.java
60 issues
Avoid throwing raw exception types.
Design

Line: 244

              
        protected void addRoleIdsCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            roleIdsCriteria.add(new Criterion(condition, value, "org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler"));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 252

              
        protected void addRoleIdsCriterion(String condition, Integer[] value1, Integer[] value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            roleIdsCriteria.add(new Criterion(condition, value1, value2, "org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler"));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 278

              
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 286

              
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 294

              
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
            allCriteria = null;
        }


            

Reported by PMD.

This class has a bunch of public methods and attributes
Design

Line: 1

              package org.linlinjava.litemall.db.domain;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class LitemallAdminExample {
    /**
     * This field was generated by MyBatis Generator.

            

Reported by PMD.

Avoid really long classes.
Design

Line: 7

              import java.util.ArrayList;
import java.util.List;

public class LitemallAdminExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_admin
     *
     * @mbg.generated

            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 30

                   *
     * @mbg.generated
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table litemall_admin
     *

            

Reported by PMD.

Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty()
Design

Line: 151

                   */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }


            

Reported by PMD.

Assigning an Object to null is a code smell. Consider refactoring.
Error

Line: 176

                   */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * This method was generated by MyBatis Generator.

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallBrand.java
60 issues
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 417

                   * @mbg.generated
     */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_brand

            

Reported by PMD.

Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 418

                   */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_brand
         *

            

Reported by PMD.

The class 'LitemallBrand' is suspected to be a Data Class (WOC=18.182%, NOPA=2, NOAM=18, WMC=44)
Design

Line: 8

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallBrand {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_brand
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallBrand' has a Modified Cyclomatic Complexity of 2 (Highest = 13).
Design

Line: 8

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallBrand {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_brand
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallBrand' has a Standard Cyclomatic Complexity of 2 (Highest = 13).
Design

Line: 8

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallBrand {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_brand
     *
     * @mbg.generated

            

Reported by PMD.

Potential violation of Law of Demeter (static property access)
Design

Line: 305

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_brand.deleted

            

Reported by PMD.

Potential violation of Law of Demeter (static property access)
Design

Line: 305

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_brand.deleted

            

Reported by PMD.

StringBuffer constructor is initialized with size 16, but has at least 123 characters appended.
Performance

Line: 340

                   */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);

            

Reported by PMD.

StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable.
Performance

Line: 341

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

Potential violation of Law of Demeter (method chain calls)
Design

Line: 341

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallGoodsProductExample.java
59 issues
Avoid throwing raw exception types.
Design

Line: 245

              
        protected void addSpecificationsCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            specificationsCriteria.add(new Criterion(condition, value, "org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 253

              
        protected void addSpecificationsCriterion(String condition, String[] value1, String[] value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            specificationsCriteria.add(new Criterion(condition, value1, value2, "org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 279

              
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 287

              
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
            allCriteria = null;
        }


            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 295

              
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
            allCriteria = null;
        }


            

Reported by PMD.

This class has a bunch of public methods and attributes
Design

Line: 1

              package org.linlinjava.litemall.db.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class LitemallGoodsProductExample {
    /**

            

Reported by PMD.

Avoid really long classes.
Design

Line: 8

              import java.util.ArrayList;
import java.util.List;

public class LitemallGoodsProductExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_goods_product
     *
     * @mbg.generated

            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 31

                   *
     * @mbg.generated
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table litemall_goods_product
     *

            

Reported by PMD.

Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty()
Design

Line: 152

                   */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }


            

Reported by PMD.

Assigning an Object to null is a code smell. Consider refactoring.
Error

Line: 177

                   */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * This method was generated by MyBatis Generator.

            

Reported by PMD.