-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added many pay bill entites and associations (#380)
Co-authored-by: hubda <[email protected]>
- Loading branch information
Showing
30 changed files
with
2,439 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 137 additions & 0 deletions
137
...a/com/bullhornsdk/data/model/entity/association/paybill/InvoiceStatementAssociations.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
package com.bullhornsdk.data.model.entity.association.paybill; | ||
|
||
import com.bullhornsdk.data.model.entity.association.AssociationField; | ||
import com.bullhornsdk.data.model.entity.association.EntityAssociations; | ||
import com.bullhornsdk.data.model.entity.association.standard.StandardAssociationField; | ||
import com.bullhornsdk.data.model.entity.core.paybill.charge.BillableCharge; | ||
import com.bullhornsdk.data.model.entity.core.paybill.invoice.*; | ||
import com.bullhornsdk.data.model.entity.core.paybill.optionslookup.SpecializedOptionsLookup; | ||
import com.bullhornsdk.data.model.entity.core.paybill.transaction.BillMasterTransaction; | ||
import com.bullhornsdk.data.model.entity.core.standard.Candidate; | ||
import com.bullhornsdk.data.model.entity.core.standard.Person; | ||
import com.bullhornsdk.data.model.entity.core.type.BullhornEntity; | ||
import com.bullhornsdk.data.model.entity.file.InvoiceStatementExport; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* Created by fayranne.lipton 4/10/2020 | ||
*/ | ||
public class InvoiceStatementAssociations implements EntityAssociations<InvoiceStatement> { | ||
|
||
private final AssociationField<InvoiceStatement, Person> bccRecipients = instantiateAssociationField("bccRecipients", Person.class); | ||
private final AssociationField<InvoiceStatement, BillableCharge> billableCharges = instantiateAssociationField("billableCharges", BillableCharge.class); | ||
private final AssociationField<InvoiceStatement, Candidate> candidates = instantiateAssociationField("candidates", Candidate.class); | ||
private final AssociationField<InvoiceStatement, Person> ccRecipients = instantiateAssociationField("ccRecipients", Person.class); | ||
private final AssociationField<InvoiceStatement, InvoiceStatementDiscount> discounts = instantiateAssociationField("discounts", InvoiceStatementDiscount.class); | ||
private final AssociationField<InvoiceStatement, SpecializedOptionsLookup> fileTypesForInvoicing = instantiateAssociationField("fileTypesForInvoicing", SpecializedOptionsLookup.class); | ||
private final AssociationField<InvoiceStatement, InvoiceStatementExport> invoiceStatementExports = instantiateAssociationField("invoiceStatementExports", InvoiceStatementExport.class); | ||
private final AssociationField<InvoiceStatement, InvoiceStatementExportBatch> invoiceStatementExportsBatches = instantiateAssociationField("invoiceStatementExportsBatches", InvoiceStatementExportBatch.class); | ||
private final AssociationField<InvoiceStatement, InvoiceStatementLineDistribution> invoiceStatementLineDistributions = instantiateAssociationField("invoiceStatementLineDistributions", InvoiceStatementLineDistribution.class); | ||
private final AssociationField<InvoiceStatement, InvoiceStatementLineItem> lineItems = instantiateAssociationField("lineItems", InvoiceStatementLineItem.class); | ||
private final AssociationField<InvoiceStatement, InvoiceStatementSplitBy> splitBys = instantiateAssociationField("splitBys", InvoiceStatementSplitBy.class); | ||
private final AssociationField<InvoiceStatement, InvoiceStatementSurcharge> surcharges = instantiateAssociationField("surcharges", InvoiceStatementSurcharge.class); | ||
private final AssociationField<InvoiceStatement, InvoiceStatementTax> taxes = instantiateAssociationField("taxes", InvoiceStatementTax.class); | ||
private List<AssociationField<InvoiceStatement, ? extends BullhornEntity>> allAssociations; | ||
|
||
private static final InvoiceStatementAssociations INSTANCE = new InvoiceStatementAssociations(); | ||
|
||
private InvoiceStatementAssociations() { | ||
super(); | ||
} | ||
|
||
public static InvoiceStatementAssociations getInstance() { | ||
return INSTANCE; | ||
} | ||
|
||
public AssociationField<InvoiceStatement, Person> bccRecipients() { | ||
return bccRecipients; | ||
} | ||
|
||
public AssociationField<InvoiceStatement, BillableCharge> billableCharges() { | ||
return billableCharges; | ||
} | ||
|
||
public AssociationField<InvoiceStatement, Candidate> candidates() { | ||
return candidates; | ||
} | ||
|
||
public AssociationField<InvoiceStatement, Person> ccRecipients() { | ||
return ccRecipients; | ||
} | ||
|
||
public AssociationField<InvoiceStatement, InvoiceStatementDiscount> discounts() { | ||
return discounts; | ||
} | ||
|
||
public AssociationField<InvoiceStatement, SpecializedOptionsLookup> fileTypesForInvoicing() { | ||
return fileTypesForInvoicing; | ||
} | ||
|
||
public AssociationField<InvoiceStatement, InvoiceStatementExport> invoiceStatementExports() { | ||
return invoiceStatementExports; | ||
} | ||
|
||
public AssociationField<InvoiceStatement, InvoiceStatementExportBatch> invoiceStatementExportsBatches() { | ||
return invoiceStatementExportsBatches; | ||
} | ||
|
||
public AssociationField<InvoiceStatement, InvoiceStatementLineDistribution> invoiceStatementLineDistributions() { | ||
return invoiceStatementLineDistributions; | ||
} | ||
|
||
public AssociationField<InvoiceStatement, InvoiceStatementLineItem> lineItems() { | ||
return lineItems; | ||
} | ||
|
||
public AssociationField<InvoiceStatement, InvoiceStatementSplitBy> splitBys() { | ||
return splitBys; | ||
} | ||
|
||
public AssociationField<InvoiceStatement, InvoiceStatementSurcharge> surcharges() { | ||
return surcharges; | ||
} | ||
|
||
public AssociationField<InvoiceStatement, InvoiceStatementTax> taxes() { | ||
return taxes; | ||
} | ||
|
||
private <E extends BullhornEntity> AssociationField<InvoiceStatement, E> instantiateAssociationField(String associationName, Class<E> associationType) { | ||
return new StandardAssociationField<InvoiceStatement, E>(associationName, associationType); | ||
} | ||
|
||
@Override | ||
public List<AssociationField<InvoiceStatement, ? extends BullhornEntity>> allAssociations() { | ||
if (allAssociations == null) { | ||
allAssociations = new ArrayList<AssociationField<InvoiceStatement, ? extends BullhornEntity>>(); | ||
allAssociations.add(bccRecipients()); | ||
allAssociations.add(billableCharges()); | ||
allAssociations.add(candidates()); | ||
allAssociations.add(ccRecipients()); | ||
allAssociations.add(discounts()); | ||
allAssociations.add(fileTypesForInvoicing()); | ||
allAssociations.add(invoiceStatementExports()); | ||
allAssociations.add(invoiceStatementExportsBatches()); | ||
allAssociations.add(invoiceStatementLineDistributions()); | ||
allAssociations.add(lineItems()); | ||
allAssociations.add(splitBys()); | ||
allAssociations.add(surcharges()); | ||
allAssociations.add(taxes()); | ||
} | ||
return allAssociations; | ||
} | ||
|
||
@Override | ||
public AssociationField<InvoiceStatement, ? extends BullhornEntity> getAssociation(String associationName) { | ||
for (AssociationField<InvoiceStatement, ? extends BullhornEntity> associationField : allAssociations()) { | ||
if (associationName.equalsIgnoreCase(associationField.getAssociationFieldName())) { | ||
return associationField; | ||
} | ||
} | ||
|
||
throw new IllegalArgumentException("There is no association on entity InvoiceStatement called: " + associationName); | ||
} | ||
} | ||
|
||
|
67 changes: 67 additions & 0 deletions
67
.../bullhornsdk/data/model/entity/association/paybill/InvoiceStatementBatchAssociations.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package com.bullhornsdk.data.model.entity.association.paybill; | ||
|
||
import com.bullhornsdk.data.model.entity.association.AssociationField; | ||
import com.bullhornsdk.data.model.entity.association.EntityAssociations; | ||
import com.bullhornsdk.data.model.entity.association.standard.StandardAssociationField; | ||
import com.bullhornsdk.data.model.entity.core.paybill.charge.BillableCharge; | ||
import com.bullhornsdk.data.model.entity.core.paybill.invoice.*; | ||
import com.bullhornsdk.data.model.entity.core.paybill.transaction.BillMasterTransaction; | ||
import com.bullhornsdk.data.model.entity.core.type.BullhornEntity; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* Created by fayranne.lipton 4/10/2020 | ||
*/ | ||
public class InvoiceStatementBatchAssociations implements EntityAssociations<InvoiceStatementBatch> { | ||
|
||
private final AssociationField<InvoiceStatementBatch, BillMasterTransaction> billMasterTransactions = instantiateAssociationField("billMasterTransactions", BillMasterTransaction.class); | ||
private final AssociationField<InvoiceStatementBatch, BillableCharge> billableCharges = instantiateAssociationField("billableCharges", BillableCharge.class); | ||
private List<AssociationField<InvoiceStatementBatch, ? extends BullhornEntity>> allAssociations; | ||
|
||
private static final InvoiceStatementBatchAssociations INSTANCE = new InvoiceStatementBatchAssociations(); | ||
|
||
private InvoiceStatementBatchAssociations() { | ||
super(); | ||
} | ||
|
||
public static InvoiceStatementBatchAssociations getInstance() { | ||
return INSTANCE; | ||
} | ||
|
||
public AssociationField<InvoiceStatementBatch, BillMasterTransaction> billMasterTransactions() { | ||
return billMasterTransactions; | ||
} | ||
|
||
public AssociationField<InvoiceStatementBatch, BillableCharge> billableCharges() { | ||
return billableCharges; | ||
} | ||
|
||
private <E extends BullhornEntity> AssociationField<InvoiceStatementBatch, E> instantiateAssociationField(String associationName, Class<E> associationType) { | ||
return new StandardAssociationField<InvoiceStatementBatch, E>(associationName, associationType); | ||
} | ||
|
||
@Override | ||
public List<AssociationField<InvoiceStatementBatch, ? extends BullhornEntity>> allAssociations() { | ||
if (allAssociations == null) { | ||
allAssociations = new ArrayList<AssociationField<InvoiceStatementBatch, ? extends BullhornEntity>>(); | ||
allAssociations.add(billMasterTransactions()); | ||
allAssociations.add(billableCharges()); | ||
} | ||
return allAssociations; | ||
} | ||
|
||
@Override | ||
public AssociationField<InvoiceStatementBatch, ? extends BullhornEntity> getAssociation(String associationName) { | ||
for (AssociationField<InvoiceStatementBatch, ? extends BullhornEntity> associationField : allAssociations()) { | ||
if (associationName.equalsIgnoreCase(associationField.getAssociationFieldName())) { | ||
return associationField; | ||
} | ||
} | ||
|
||
throw new IllegalArgumentException("There is no association on entity InvoiceStatementBatch called: " + associationName); | ||
} | ||
} | ||
|
||
|
70 changes: 70 additions & 0 deletions
70
.../data/model/entity/association/paybill/InvoiceStatementDistributionBatchAssociations.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package com.bullhornsdk.data.model.entity.association.paybill; | ||
|
||
import com.bullhornsdk.data.model.entity.association.AssociationField; | ||
import com.bullhornsdk.data.model.entity.association.EntityAssociations; | ||
import com.bullhornsdk.data.model.entity.association.standard.StandardAssociationField; | ||
import com.bullhornsdk.data.model.entity.core.paybill.charge.BillableCharge; | ||
import com.bullhornsdk.data.model.entity.core.paybill.invoice.InvoiceStatement; | ||
import com.bullhornsdk.data.model.entity.core.paybill.invoice.InvoiceStatementDistributionBatch; | ||
import com.bullhornsdk.data.model.entity.core.paybill.invoice.InvoiceStatementDistributionBatch; | ||
import com.bullhornsdk.data.model.entity.core.paybill.invoice.InvoiceStatementLineDistribution; | ||
import com.bullhornsdk.data.model.entity.core.paybill.transaction.BillMasterTransaction; | ||
import com.bullhornsdk.data.model.entity.core.type.BullhornEntity; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* Created by fayranne.lipton 4/10/2020 | ||
*/ | ||
public class InvoiceStatementDistributionBatchAssociations implements EntityAssociations<InvoiceStatementDistributionBatch> { | ||
|
||
private final AssociationField<InvoiceStatementDistributionBatch, InvoiceStatementLineDistribution> invoiceStatementLineDistributions = instantiateAssociationField("invoiceStatementLineDistributions", InvoiceStatementLineDistribution.class); | ||
private final AssociationField<InvoiceStatementDistributionBatch, InvoiceStatement> invoiceStatements = instantiateAssociationField("invoiceStatements", InvoiceStatement.class); | ||
private List<AssociationField<InvoiceStatementDistributionBatch, ? extends BullhornEntity>> allAssociations; | ||
|
||
private static final InvoiceStatementDistributionBatchAssociations INSTANCE = new InvoiceStatementDistributionBatchAssociations(); | ||
|
||
private InvoiceStatementDistributionBatchAssociations() { | ||
super(); | ||
} | ||
|
||
public static InvoiceStatementDistributionBatchAssociations getInstance() { | ||
return INSTANCE; | ||
} | ||
|
||
public AssociationField<InvoiceStatementDistributionBatch, InvoiceStatementLineDistribution> invoiceStatementLineDistributions() { | ||
return invoiceStatementLineDistributions; | ||
} | ||
|
||
public AssociationField<InvoiceStatementDistributionBatch, InvoiceStatement> invoiceStatements() { | ||
return invoiceStatements; | ||
} | ||
|
||
private <E extends BullhornEntity> AssociationField<InvoiceStatementDistributionBatch, E> instantiateAssociationField(String associationName, Class<E> associationType) { | ||
return new StandardAssociationField<InvoiceStatementDistributionBatch, E>(associationName, associationType); | ||
} | ||
|
||
@Override | ||
public List<AssociationField<InvoiceStatementDistributionBatch, ? extends BullhornEntity>> allAssociations() { | ||
if (allAssociations == null) { | ||
allAssociations = new ArrayList<AssociationField<InvoiceStatementDistributionBatch, ? extends BullhornEntity>>(); | ||
allAssociations.add(invoiceStatementLineDistributions()); | ||
allAssociations.add(invoiceStatements()); | ||
} | ||
return allAssociations; | ||
} | ||
|
||
@Override | ||
public AssociationField<InvoiceStatementDistributionBatch, ? extends BullhornEntity> getAssociation(String associationName) { | ||
for (AssociationField<InvoiceStatementDistributionBatch, ? extends BullhornEntity> associationField : allAssociations()) { | ||
if (associationName.equalsIgnoreCase(associationField.getAssociationFieldName())) { | ||
return associationField; | ||
} | ||
} | ||
|
||
throw new IllegalArgumentException("There is no association on entity InvoiceStatementDistributionBatch called: " + associationName); | ||
} | ||
} | ||
|
||
|
Oops, something went wrong.