Skip to content

Commit c78614a

Browse files
author
tstone
committed
Merge branch 'merger' into master
2 parents 260cfe1 + 9f7dede commit c78614a

22 files changed

+1410
-395
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
*.prefs
3+
4+
fflib/salesforce.schema

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: java
2+
jdk:
3+
- oraclejdk8
4+
sudo: false
5+
branches:
6+
only:
7+
- master
8+
env:
9+
global:
10+
- secure: "EG37gA3LxAJR9FzUSzDc4iXLmOZ0o5Qbel7mzVfxnkrbiBH59wconB6mq+/gpc5AihFLoehjjskQKEcRYl7xc256iChwzZE9bf7PTYnGtscLIQwNenPEpxPBJTw9oLJK3wgShcjMF/1ZfqHoGmzkwxnmzJKzuaZ9OW1l8uqn+Lw="
11+
- secure: "ctp6SfgSVW3HqfpdRykfIq5lPOZk900wag0RC33NfYjxoXUTu797F6KhOGojqfh1E0/Ivng1IngvFScAFyDscpIJzTu+2/FMP9qsC2bn/e4iXg8sjhmgKhjqg/rFHiAJQz/XuW0b1xom2dxQ12ipiouniooveHe1f7541LrQq6c="
12+
script:
13+
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && ant -lib lib/ant-salesforce.jar -Dsf.username=${SFUSER} -Dsf.password=${SFPWD} deploy || [ "${TRAVIS_PULL_REQUEST}" != "false" ]'
14+
- '[ "${TRAVIS_PULL_REQUEST}" != "false" ] && ant -lib lib/ant-salesforce.jar -Dsf.username=${SFUSER} -Dsf.password=${SFPWD} deploy || [ "${TRAVIS_PULL_REQUEST}" = "false" ]'

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
FinancialForce Apex Common
22
==========================
33

4+
[![Build Status](https://travis-ci.org/financialforcedev/fflib-apex-common.svg)](https://travis-ci.org/financialforcedev/fflib-apex-common)
5+
46
**Dependencies:** Must deploy [ApexMocks](https://github.com/financialforcedev/fflib-apex-mocks) before deploying this library
57

68
<a href="https://githubsfdeploy.herokuapp.com?owner=financialforcedev&repo=fflib-apex-common">

build.xml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<project xmlns:sf="antlib:com.salesforce" basedir="." xmlns:git="antlib:com.rimerosolutions.ant.git" default="deploy">
2+
3+
<property name="sf.server" value="https://login.salesforce.com"/>
4+
<import file="${basedir}/lib/exec_anon.xml"/>
5+
<import file="${basedir}/lib/undeploy.xml"/>
6+
7+
<!-- Downloaded from Salesforce Tools page under Setup -->
8+
<typedef
9+
uri="antlib:com.salesforce"
10+
resource="com/salesforce/antlib.xml"
11+
classpath="${basedir}/lib/ant-salesforce.jar"/>
12+
13+
<!-- See https://github.com/rimerosolutions/ant-git-tasks -->
14+
<taskdef uri="antlib:com.rimerosolutions.ant.git"
15+
resource="com/rimerosolutions/ant/git/jgit-ant-lib.xml">
16+
<classpath>
17+
<pathelement location="${basedir}/lib/org.eclipse.jgit.ant-3.0.0.201306101825-r.jar"/>
18+
<pathelement location="${basedir}/lib/org.eclipse.jgit-3.0.0.201306101825-r.jar"/>
19+
<pathelement location="${basedir}/lib/jsch-0.1.50.jar"/>
20+
<pathelement location="${basedir}/lib/ant-git-tasks-0.0.1.jar"/>
21+
</classpath>
22+
</taskdef>
23+
24+
<!-- Deploy -->
25+
<target name="deploy" depends="undeploy">
26+
27+
<!-- Download and deploy ApexMocks -->
28+
<delete dir="${basedir}/lib/apexmocks"/>
29+
<echo message="Cloning fflib-apex-mocks..."/>
30+
<git:git directory="${basedir}/lib/apexmocks" verbose="false">
31+
<git:clone uri="https://github.com/financialforcedev/fflib-apex-mocks.git"/>
32+
</git:git>
33+
<sf:deploy
34+
username="${sf.username}"
35+
password="${sf.password}"
36+
serverurl="${sf.server}"
37+
testLevel="RunLocalTests"
38+
deployRoot="${basedir}/lib/apexmocks/src"/>
39+
40+
<!-- Deploy Apex Commons -->
41+
<sf:deploy
42+
username="${sf.username}"
43+
password="${sf.password}"
44+
serverurl="${sf.server}"
45+
testLevel="RunLocalTests"
46+
deployRoot="${basedir}/fflib/src"/>
47+
48+
</target>
49+
50+
</project>

fflib/src/classes/fflib_ISObjectUnitOfWork.cls

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ public interface fflib_ISObjectUnitOfWork
5050
* @param record An existing record
5151
**/
5252
void registerDirty(SObject record);
53+
/**
54+
* Register an existing record to be updated when commitWork is called,
55+
* you may also provide a reference to the parent record instance (should also be registered as new separatly)
56+
*
57+
* @param record A newly created SObject instance to be inserted during commitWork
58+
* @param relatedToParentField A SObjectField reference to the child field that associates the child record with its parent
59+
* @param relatedToParentRecord A SObject instance of the parent record (should also be registered as new separatly)
60+
**/
61+
void registerDirty(SObject record, Schema.sObjectField relatedToParentField, SObject relatedToParentRecord);
5362
/**
5463
* Register a list of existing records to be updated during the commitWork method
5564
*

0 commit comments

Comments
 (0)