Skip to content

Commit

Permalink
Merge branch 'master' into log4j-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
fayranne authored Apr 11, 2023
2 parents 82a7209 + 4766e72 commit 3ce919d
Show file tree
Hide file tree
Showing 42 changed files with 4,926 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.bullhorn</groupId>
<artifactId>sdk-rest</artifactId>
<version>1.5.0</version>
<version>1.4.59</version>
<packaging>jar</packaging>

<name>Bullhorn REST SDK</name>
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/com/bullhornsdk/data/api/mock/MockDataLoader.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import com.bullhornsdk.data.model.entity.core.customobjectinstances.person.*
import com.bullhornsdk.data.model.entity.core.customobjectinstances.placement.*
import com.bullhornsdk.data.model.entity.core.edithistory.EditHistory
import com.bullhornsdk.data.model.entity.core.edithistory.FieldChange
import com.bullhornsdk.data.model.entity.core.eds.EdsData
import com.bullhornsdk.data.model.entity.core.eds.EdsEntityType
import com.bullhornsdk.data.model.entity.core.eds.EdsEntityTypeSchemaVersion
import com.bullhornsdk.data.model.entity.core.eds.EdsSourceSystem
import com.bullhornsdk.data.model.entity.core.onboarding365.forms.FederalTaxForm
import com.bullhornsdk.data.model.entity.core.onboarding365.forms.LocalTaxForm
import com.bullhornsdk.data.model.entity.core.onboarding365.forms.StateTaxForm
Expand Down Expand Up @@ -466,6 +470,8 @@ public class MockDataLoader {
entityFiles.put(PlacementCertification.class, "placementcertification-data.txt");
entityFiles.put(PlacementChangeRequest.class, "placementchangerequest-data.txt");
entityFiles.put(PlacementCommission.class, "placementcommission-data.txt");
entityFiles.put(PlacementShiftSet.class, "placementshiftset-data.txt");
entityFiles.put(PlacementShiftSetVersion.class, "placementshiftsetVersion-data.txt");
entityFiles.put(PrivateLabel.class, "privatelabel-data.txt");
entityFiles.put(Report.class, "report-data.txt");
entityFiles.put(Sendout.class, "sendout-data.txt");
Expand All @@ -476,6 +482,7 @@ public class MockDataLoader {
entityFiles.put(Tearsheet.class, "tearsheet-data.txt");
entityFiles.put(TearsheetMember.class, "tearsheetmember-data.txt");
entityFiles.put(TimeUnit.class, "timeunit-data.txt");
entityFiles.put(UserSetting.class, "usersetting-data.txt");
entityFiles.put(UserType.class, "usertype-data.txt");
entityFiles.put(WorkersCompensation.class, "workerscompensation-data.txt");
entityFiles.put(WorkersCompensationRate.class, "workerscompensationrate-data.txt");
Expand Down Expand Up @@ -683,6 +690,12 @@ public class MockDataLoader {

entityFiles.put(CandidateAvailability.class, "candidateavailability-data.txt");

// enterprise data store
entityFiles.put(EdsData.class, "eds/edsdata-data.txt");
entityFiles.put(EdsEntityType.class, "eds/entitytype-data.txt");
entityFiles.put(EdsEntityTypeSchemaVersion.class, "eds/entitytypeschemaversion-data.txt");
entityFiles.put(EdsSourceSystem.class, "eds/sourcesystem-data.txt");

return entityFiles;
}

Expand Down Expand Up @@ -732,6 +745,7 @@ public class MockDataLoader {
entityMetaFiles.put(PlacementCertification.class, "meta/placementcertification-meta-data.txt");
entityMetaFiles.put(PlacementChangeRequest.class, "meta/placementchangerequest-meta-data.txt");
entityMetaFiles.put(PlacementCommission.class, "meta/placementcommission-meta-data.txt");
entityMetaFiles.put(PlacementShiftSet.class, "meta/placementshiftset-meta-data.txt");
entityMetaFiles.put(PrivateLabel.class, "meta/privatelabel-meta-data.txt");
entityMetaFiles.put(Report.class, "meta/report-meta-data.txt")
entityMetaFiles.put(Sendout.class, "meta/sendout-meta-data.txt");
Expand All @@ -740,6 +754,7 @@ public class MockDataLoader {
entityMetaFiles.put(State.class, "meta/state-meta-data.txt");
entityMetaFiles.put(Task.class, "meta/task-meta-data.txt");
entityMetaFiles.put(TimeUnit.class, "meta/timeunit-meta-data.txt");
entityMetaFiles.put(UserSetting.class, "meta/usersetting-meta-data.txt");
entityMetaFiles.put(UserType.class, "meta/usertype-meta-data.txt");
entityMetaFiles.put(WorkersCompensation.class, "meta/workerscompensation-meta-data.txt");
entityMetaFiles.put(WorkersCompensationRate.class, "meta/workerscompensationrate-meta-data.txt");
Expand Down Expand Up @@ -936,6 +951,12 @@ public class MockDataLoader {

entityMetaFiles.put(CandidateAvailability.class, "meta/candidateavailability-meta-data.txt");

// enterprise data store
entityMetaFiles.put(EdsData.class, "meta/eds/edsdata-meta-data.txt");
entityMetaFiles.put(EdsEntityType.class, "meta/eds/entitytype-meta-data.txt");
entityMetaFiles.put(EdsEntityTypeSchemaVersion.class, "meta/eds/entitytypeschemaversion-meta-data.txt");
entityMetaFiles.put(EdsSourceSystem.class, "meta/eds/sourcesystem-meta-data.txt");

return entityMetaFiles;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class AssociationFactory {
private static final JobOrderAssociations jobOrderAssociations = JobOrderAssociations.getInstance();
private static final NoteAssociations noteAssociations = NoteAssociations.getInstance();
private static final PlacementAssociations placementAssociations = PlacementAssociations.getInstance();
private static final PlacementShiftSetAssociations placementShiftSetAssociations = PlacementShiftSetAssociations.getInstance();
private static final OpportunityAssociations opportunityAssociations = OpportunityAssociations.getInstance();
private static final LeadAssociations leadAssociations = LeadAssociations.getInstance();
private static final TearsheetAssociations tearsheetAssociations = TearsheetAssociations.getInstance();
Expand Down Expand Up @@ -171,6 +172,10 @@ private static <T extends AssociationEntity> EntityAssociations<T> getEntityAsso
return (EntityAssociations<T>) unbilledRevenueDistributionAssociations;
}

if (type == PlacementShiftSet.class) {
return (EntityAssociations<T>) placementShiftSetAssociations;
}

return null;

}
Expand Down Expand Up @@ -396,4 +401,12 @@ public static UnbilledRevenueDistributionAssociations unbilledRevenueDistributio
return unbilledRevenueDistributionAssociations;
}

/**
* Returns the associations for PlacementShiftSetAssociations
*
* @return
*/
public static PlacementShiftSetAssociations placementShiftSetAssociations() {
return placementShiftSetAssociations;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.bullhornsdk.data.model.entity.association.standard;

import java.util.ArrayList;
import java.util.List;

import com.bullhornsdk.data.model.entity.association.AssociationField;
import com.bullhornsdk.data.model.entity.association.EntityAssociations;
import com.bullhornsdk.data.model.entity.core.standard.PlacementShiftSet;
import com.bullhornsdk.data.model.entity.core.standard.PlacementShiftSetVersion;
import com.bullhornsdk.data.model.entity.core.type.BullhornEntity;

public class PlacementShiftSetAssociations implements EntityAssociations<PlacementShiftSet> {

private List<AssociationField<PlacementShiftSet, ? extends BullhornEntity>> allAssociations;
private final AssociationField<PlacementShiftSet, PlacementShiftSetVersion> versions = instantiateAssociationField("versions", PlacementShiftSetVersion.class);

private static final PlacementShiftSetAssociations INSTANCE = new PlacementShiftSetAssociations();

private PlacementShiftSetAssociations() {
super();
}

public static PlacementShiftSetAssociations getInstance() {
return INSTANCE;
}

public AssociationField<PlacementShiftSet, PlacementShiftSetVersion> versions() {
return versions;
}


private <E extends BullhornEntity> AssociationField<PlacementShiftSet, E> instantiateAssociationField(String associationName, Class<E> associationType) {
return new StandardAssociationField<PlacementShiftSet, E>(associationName, associationType);
}

@Override
public List<AssociationField<PlacementShiftSet, ? extends BullhornEntity>> allAssociations() {
if (allAssociations == null) {
allAssociations = new ArrayList<AssociationField<PlacementShiftSet, ? extends BullhornEntity>>();
allAssociations.add(versions());
}
return allAssociations;
}

@Override
public AssociationField<PlacementShiftSet, ? extends BullhornEntity> getAssociation(String associationName) {
for (AssociationField<PlacementShiftSet, ? extends BullhornEntity> associationField : allAssociations()) {
if (associationName.equalsIgnoreCase(associationField.getAssociationFieldName())) {
return associationField;
}
}

throw new IllegalArgumentException("There is no association on entity PlacementShiftSet called: " + associationName);
}
}
Loading

0 comments on commit 3ce919d

Please sign in to comment.