@Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }

    if (!(obj instanceof LayoutSetBranch)) {
      return false;
    }

    LayoutSetBranch layoutSetBranch = (LayoutSetBranch) obj;

    long primaryKey = layoutSetBranch.getPrimaryKey();

    if (getPrimaryKey() == primaryKey) {
      return true;
    } else {
      return false;
    }
  }
  @Override
  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    }

    LayoutSetBranch layoutSetBranch = null;

    try {
      layoutSetBranch = (LayoutSetBranch) obj;
    } catch (ClassCastException cce) {
      return false;
    }

    long primaryKey = layoutSetBranch.getPrimaryKey();

    if (getPrimaryKey() == primaryKey) {
      return true;
    } else {
      return false;
    }
  }