private PlanAlignmentChange getPlanChangeAlignment(final PlanPhaseSpecifier from, final PlanSpecifier to, final StaticCatalog catalog) throws CatalogApiException { final PlanAlignmentChange result = DefaultCaseChange.getResult(changeAlignmentCase, from, to, catalog); return (result != null) ? result : PlanAlignmentChange.START_OF_BUNDLE; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof DefaultCaseChangePlanPolicy)) { return false; } if (!super.equals(o)) { return false; } final DefaultCaseChangePlanPolicy that = (DefaultCaseChangePlanPolicy) o; if (policy != that.policy) { return false; } return true; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (alignment != null ? alignment.hashCode() : 0); return result; }
final void populateDefaultCaseChange(final CaseChange input, final DefaultCaseChange result) { result.setPhaseType(input.getPhaseType()); result.setFromBillingPeriod(input.getFromBillingPeriod()); result.setFromPriceList(toDefaultPriceList(input.getFromPriceList())); result.setFromProduct(toDefaultProduct(input.getFromProduct())); result.setFromProductCategory(input.getFromProductCategory()); result.setToBillingPeriod(input.getToBillingPeriod()); result.setToPriceList(toDefaultPriceList(input.getToPriceList())); result.setToProduct(toDefaultProduct(input.getToProduct())); result.setToProductCategory(input.getToProductCategory()); }
@Override public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); this.alignment = in.readBoolean() ? PlanAlignmentChange.valueOf(in.readUTF()) : null; } }
@Override public void initialize(final StandaloneCatalog catalog) { super.initialize(catalog); CatalogSafetyInitializer.initializeNonRequiredNullFieldsWithDefaultValue(this); }
final void populateDefaultCaseChange(final CaseChange input, final DefaultCaseChange result) { result.setPhaseType(input.getPhaseType()); result.setFromBillingPeriod(input.getFromBillingPeriod()); result.setFromPriceList(toDefaultPriceList(input.getFromPriceList())); result.setFromProduct(toDefaultProduct(input.getFromProduct())); result.setFromProductCategory(input.getFromProductCategory()); result.setToBillingPeriod(input.getToBillingPeriod()); result.setToPriceList(toDefaultPriceList(input.getToPriceList())); result.setToProduct(toDefaultProduct(input.getToProduct())); result.setToProductCategory(input.getToProductCategory()); }
@Override public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); this.policy = in.readBoolean() ? BillingActionPolicy.valueOf(in.readUTF()) : null; } }
@Override public void initialize(final StandaloneCatalog catalog) { super.initialize(catalog); CatalogSafetyInitializer.initializeNonRequiredNullFieldsWithDefaultValue(this); }
public static <K> K getResult(final DefaultCaseChange<K>[] cases, final PlanPhaseSpecifier from, final PlanSpecifier to, final StaticCatalog catalog) throws CatalogApiException { if (cases != null) { for (final DefaultCaseChange<K> cc : cases) { final K result = cc.getResult(from, to, catalog); if (result != null) { return result; } } } return null; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (policy != null ? policy.hashCode() : 0); return result; }
@Override public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); this.policy = in.readBoolean() ? BillingActionPolicy.valueOf(in.readUTF()) : null; } }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof DefaultCaseChangePlanAlignment)) { return false; } if (!super.equals(o)) { return false; } final DefaultCaseChangePlanAlignment that = (DefaultCaseChangePlanAlignment) o; if (alignment != that.alignment) { return false; } return true; }
private BillingActionPolicy getPlanChangePolicy(final PlanPhaseSpecifier from, final PlanSpecifier to, final StaticCatalog catalog) throws CatalogApiException { final BillingActionPolicy result = DefaultCaseChange.getResult(changeCase, from, to, catalog); return (result != null) ? result : BillingActionPolicy.END_OF_TERM; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (policy != null ? policy.hashCode() : 0); return result; }
@Override public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); this.alignment = in.readBoolean() ? PlanAlignmentChange.valueOf(in.readUTF()) : null; } }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof DefaultCaseChangePlanPolicy)) { return false; } if (!super.equals(o)) { return false; } final DefaultCaseChangePlanPolicy that = (DefaultCaseChangePlanPolicy) o; if (policy != that.policy) { return false; } return true; }
Result.LALA); final Result r1 = DefaultCaseChange.getResult(new DefaultCaseChangeResult[]{cr0, cr1, cr2, cr3, cr4}, new PlanPhaseSpecifier(product1.getName(), BillingPeriod.MONTHLY, priceList1.getName(), PhaseType.EVERGREEN), new PlanSpecifier(product2.getName(), BillingPeriod.MONTHLY, priceList2.getName()), cat); final Result r2 = DefaultCaseChange.getResult(new DefaultCaseChangeResult[]{cr0, cr1, cr2, cr3, cr4}, new PlanPhaseSpecifier(product1.getName(), BillingPeriod.MONTHLY, priceList1.getName(), PhaseType.EVERGREEN), new PlanSpecifier(product2.getName(), BillingPeriod.ANNUAL, priceList2.getName()), cat);
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (alignment != null ? alignment.hashCode() : 0); return result; }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof DefaultCaseChangePlanAlignment)) { return false; } if (!super.equals(o)) { return false; } final DefaultCaseChangePlanAlignment that = (DefaultCaseChangePlanAlignment) o; if (alignment != that.alignment) { return false; } return true; }