public static String prettyPrint(PagingType paging) { if (paging == null) { return "null"; } StringBuilder sb = new StringBuilder("Paging("); if (paging.getOffset() != null) { sb.append(paging.getOffset()).append(","); } else { sb.append(","); } if (paging.getMaxSize() != null) { sb.append(paging.getMaxSize()).append(","); } else { sb.append(","); } if (paging.getOrderBy() != null) { sb.append(prettyPrint(paging.getOrderBy())).append(","); } else { sb.append(","); } if (paging.getOrderDirection() != null) { sb.append(paging.getOrderDirection()); } sb.append(")"); return sb.toString(); }
/** * Creates and returns a deep copy of this object. * * * @return * A deep copy of this object. */ @Override public PagingType clone() { try { { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 final PagingType clone = ((PagingType) super.clone()); // CWildcardTypeInfo: org.w3c.dom.Element clone.orderBy = ((this.orderBy == null)?null:((this.getOrderBy() == null)?null:(this.getOrderBy().clone()))); // CEnumLeafInfo: com.evolveum.prism.xml.ns._public.query_3.OrderDirectionType clone.orderDirection = ((this.orderDirection == null)?null:this.getOrderDirection()); // CBuiltinLeafInfo: java.lang.Integer clone.offset = ((this.offset == null)?null:this.getOffset()); // CBuiltinLeafInfo: java.lang.Integer clone.maxSize = ((this.maxSize == null)?null:this.getMaxSize()); // CWildcardTypeInfo: org.w3c.dom.Element clone.groupBy = ((this.groupBy == null)?null:((this.getGroupBy() == null)?null:(this.getGroupBy().clone()))); return clone; } } catch (CloneNotSupportedException e) { // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ throw new AssertionError(e); } }
public static ObjectPaging createObjectPaging(PagingType pagingType, PrismContext prismContext) { if (pagingType == null) { return null; } if (pagingType.getOrderBy() != null && pagingType.getGroupBy() != null) { return prismContext.queryFactory().createPaging(pagingType.getOffset(), pagingType.getMaxSize(), pagingType.getOrderBy().getItemPath(), toOrderDirection(pagingType.getOrderDirection()), pagingType.getGroupBy().getItemPath()); } if (pagingType.getOrderBy() != null) { return prismContext.queryFactory().createPaging(pagingType.getOffset(), pagingType.getMaxSize(), pagingType.getOrderBy().getItemPath(), toOrderDirection(pagingType.getOrderDirection())); } if (pagingType.getGroupBy() != null) { return prismContext.queryFactory().createPaging(pagingType.getGroupBy().getItemPath()); } else { return prismContext.queryFactory().createPaging(pagingType.getOffset(), pagingType.getMaxSize()); } }
lhsOrderBy = this.getOrderBy(); ItemPathType rhsOrderBy; rhsOrderBy = that.getOrderBy(); if (!strategy.equals(LocatorUtils.property(thisLocator, "orderBy", lhsOrderBy), LocatorUtils.property(thatLocator, "orderBy", rhsOrderBy), lhsOrderBy, rhsOrderBy)) { return false; lhsGroupBy = this.getGroupBy(); ItemPathType rhsGroupBy; rhsGroupBy = that.getOrderBy(); if (!strategy.equals(LocatorUtils.property(thisLocator, "groupBy", lhsGroupBy), LocatorUtils.property(thatLocator, "groupBy", rhsGroupBy), lhsGroupBy, rhsGroupBy)) { return false;
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { ItemPathType theOrderBy; theOrderBy = this.getOrderBy(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orderBy", theOrderBy), currentHashCode, theOrderBy); } { OrderDirectionType theOrderDirection; theOrderDirection = this.getOrderDirection(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orderDirection", theOrderDirection), currentHashCode, theOrderDirection); } { Integer theOffset; theOffset = this.getOffset(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "offset", theOffset), currentHashCode, theOffset); } { Integer theMaxSize; theMaxSize = this.getMaxSize(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "maxSize", theMaxSize), currentHashCode, theMaxSize); } { ItemPathType theGroupBy; theGroupBy = this.getGroupBy(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "groupBy", theGroupBy), currentHashCode, theGroupBy); } return currentHashCode; }