Created
December 11, 2013 22:43
-
-
Save hugithordarson/7919872 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
private static NSArray<Integer> jobLineIDsWithOrphans( EOEditingContext ec, String companyNumber, Integer customerID ) { | |
NSMutableArray<EOQualifier> a = new NSMutableArray<>(); | |
if( companyNumber != null ) { | |
a.addObject( JoblineOrphan.COMPANY_NUMBER.eq( companyNumber ) ); | |
} | |
if( customerID != null ) { | |
a.addObject( JoblineOrphan.CUSTOMER_ID.eq( customerID ) ); | |
} | |
EOAndQualifier q = new EOAndQualifier( a ); | |
EOFetchSpecification fs = new EOFetchSpecification( JoblineOrphan.ENTITY_NAME, q, null ); | |
fs.setFetchesRawRows( true ); | |
fs.setRawRowKeyPaths( new NSArray<>( "jobLineID" ) ); | |
NSArray<NSDictionary> fetched = ec.objectsWithFetchSpecification( fs ); | |
return (NSArray<Integer>)fetched.valueForKey( "jobLineID" ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment