Skip to content

Commit

Permalink
getters, setters, clone
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Mar 11, 2015
1 parent 33f72ac commit d2bb812
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 34 deletions.
Expand Up @@ -258,36 +258,47 @@ public Boolean getAllowNotFound() {
return allowNotFound;
}

public void setAllowNotFound(Boolean allowNotFound) {
this.allowNotFound = allowNotFound;
}

public static boolean isAllowNotFound(GetOperationOptions options) {
if (options == null) {
return false;
}
if (options.allowNotFound == null) {
return false;
}
return options.allowNotFound;
public void setAllowNotFound(Boolean allowNotFound) {
this.allowNotFound = allowNotFound;
}

public static boolean isAllowNotFound(GetOperationOptions options) {
if (options == null) {
return false;
}

public static GetOperationOptions createDoNotDiscovery() {
GetOperationOptions opts = new GetOperationOptions();
opts.setDoNotDiscovery(true);
return opts;
if (options.allowNotFound == null) {
return false;
}
return options.allowNotFound;
}

public static GetOperationOptions createDoNotDiscovery() {
GetOperationOptions opts = new GetOperationOptions();
opts.setDoNotDiscovery(true);
return opts;
}

public RelationalValueSearchQuery getRelationalValueSearchQuery() {
return relationalValueSearchQuery;
}

public void setRelationalValueSearchQuery(RelationalValueSearchQuery relationalValueSearchQuery) {
this.relationalValueSearchQuery = relationalValueSearchQuery;
}

@Override
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((allowNotFound == null) ? 0 : allowNotFound.hashCode());
result = prime * result + ((doNotDiscovery == null) ? 0 : doNotDiscovery.hashCode());
result = prime * result + ((noFetch == null) ? 0 : noFetch.hashCode());
result = prime * result + ((raw == null) ? 0 : raw.hashCode());
result = prime * result
+ ((relationalValueSearchQuery == null) ? 0 : relationalValueSearchQuery.hashCode());
result = prime * result + ((resolve == null) ? 0 : resolve.hashCode());
result = prime * result + ((doNotDiscovery == null) ? 0 : doNotDiscovery.hashCode());
result = prime * result + ((allowNotFound == null) ? 0 : allowNotFound.hashCode());
result = prime * result + ((resolveNames == null) ? 0 : resolveNames.hashCode());
result = prime * result + ((retrieve == null) ? 0 : retrieve.hashCode());
return result;
}

Expand All @@ -300,6 +311,16 @@ public boolean equals(Object obj) {
if (getClass() != obj.getClass())
return false;
GetOperationOptions other = (GetOperationOptions) obj;
if (allowNotFound == null) {
if (other.allowNotFound != null)
return false;
} else if (!allowNotFound.equals(other.allowNotFound))
return false;
if (doNotDiscovery == null) {
if (other.doNotDiscovery != null)
return false;
} else if (!doNotDiscovery.equals(other.doNotDiscovery))
return false;
if (noFetch == null) {
if (other.noFetch != null)
return false;
Expand All @@ -310,30 +331,27 @@ public boolean equals(Object obj) {
return false;
} else if (!raw.equals(other.raw))
return false;
if (relationalValueSearchQuery == null) {
if (other.relationalValueSearchQuery != null)
return false;
} else if (!relationalValueSearchQuery.equals(other.relationalValueSearchQuery))
return false;
if (resolve == null) {
if (other.resolve != null)
return false;
} else if (!resolve.equals(other.resolve))
return false;
if (doNotDiscovery == null) {
if (other.doNotDiscovery != null)
if (resolveNames == null) {
if (other.resolveNames != null)
return false;
} else if (!doNotDiscovery.equals(other.doNotDiscovery))
} else if (!resolveNames.equals(other.resolveNames))
return false;

if (allowNotFound == null) {
if (other.allowNotFound != null)
return false;
} else if (!allowNotFound.equals(other.allowNotFound))
if (retrieve != other.retrieve)
return false;

if (retrieve != null ? !retrieve.equals(other.retrieve) : other.retrieve != null)
return false;

return true;
}

public GetOperationOptions clone() {
public GetOperationOptions clone() {
GetOperationOptions clone = new GetOperationOptions();
clone.noFetch = this.noFetch;
clone.doNotDiscovery = this.doNotDiscovery;
Expand All @@ -342,13 +360,17 @@ public GetOperationOptions clone() {
clone.resolveNames = this.resolveNames;
clone.retrieve = this.retrieve;
clone.allowNotFound = this.allowNotFound;
if (this.relationalValueSearchQuery != null) {
clone.relationalValueSearchQuery = this.relationalValueSearchQuery.clone();
}
return clone;
}

@Override
public String toString() {
return "GetOperationOptions(resolve=" + resolve + ", resolveNames=" + resolveNames + ",noFetch=" + noFetch
+ ", raw=" + raw + ", doNotDiscovery="+doNotDiscovery+", retrieve="+retrieve+", allowNotFound="+ allowNotFound +")";
+ ", raw=" + raw + ", doNotDiscovery="+doNotDiscovery+", retrieve="+retrieve+", allowNotFound="+ allowNotFound
+", relationalValueSearchQuery="+relationalValueSearchQuery+")";
}

}
Expand Up @@ -45,6 +45,46 @@ public RelationalValueSearchQuery(QName column, String searchValue, RelationalVa
this.searchType = searchType;
}

public QName getColumn() {
return column;
}

public void setColumn(QName column) {
this.column = column;
}

public String getSearchValue() {
return searchValue;
}

public void setSearchValue(String searchValue) {
this.searchValue = searchValue;
}

public RelationalValueSearchType getSearchType() {
return searchType;
}

public void setSearchType(RelationalValueSearchType searchType) {
this.searchType = searchType;
}

public ObjectPaging getPaging() {
return paging;
}

public void setPaging(ObjectPaging paging) {
this.paging = paging;
}

public RelationalValueSearchQuery clone() {
RelationalValueSearchQuery clone = new RelationalValueSearchQuery(column, searchValue, searchType);
if (this.paging != null) {
clone.paging = this.paging.clone();
}
return clone;
}

@Override
public int hashCode() {
final int prime = 31;
Expand Down

0 comments on commit d2bb812

Please sign in to comment.