diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java index 4db4c4cc54..d45db7520d 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java @@ -75,40 +75,39 @@ public class EntitySaxReader extends DefaultHandler { public static final int DEFAULT_TX_TIMEOUT = 7200; protected org.xml.sax.Locator locator; - protected Delegator delegator; - protected EntityEcaHandler ecaHandler = null; - protected GenericValue currentValue = null; - protected CharSequence currentFieldName = null; + private Delegator delegator; + private EntityEcaHandler ecaHandler = null; + private GenericValue currentValue = null; + private CharSequence currentFieldName = null; private char[] currentFieldValue = null; - protected long numberRead = 0; - protected long numberCreated = 0; - protected long numberUpdated = 0; - protected long numberReplaced = 0; - protected long numberDeleted = 0; - protected long numberSkipped = 0; + private long numberRead = 0; + private long numberCreated = 0; + private long numberUpdated = 0; + private long numberReplaced = 0; + private long numberDeleted = 0; + private long numberSkipped = 0; - protected int valuesPerWrite = 100; - protected int valuesPerMessage = 1000; - protected int transactionTimeout = 7200; - protected boolean useTryInsertMethod = false; - protected boolean maintainTxStamps = false; - protected boolean createDummyFks = false; - protected boolean checkDataOnly = false; - protected boolean disableEeca = false; - protected enum Action {CREATE, CREATE_UPDATE, CREATE_REPLACE, DELETE}; - protected List actionTags = UtilMisc.toList("create", "create-update", "create-replace", "delete"); - protected Action currentAction = Action.CREATE_UPDATE; - protected List messageList = null; + private int valuesPerWrite = 100; + private int valuesPerMessage = 1000; + private int transactionTimeout = 7200; + private boolean useTryInsertMethod = false; + private boolean maintainTxStamps = false; + private boolean createDummyFks = false; + private boolean checkDataOnly = false; + private enum Action {CREATE, CREATE_UPDATE, CREATE_REPLACE, DELETE}; + private List actionTags = UtilMisc.toList("create", "create-update", "create-replace", "delete"); + private Action currentAction = Action.CREATE_UPDATE; + private List messageList = null; - protected List valuesToWrite = new ArrayList<>(valuesPerWrite); - protected List valuesToDelete = new ArrayList<>(valuesPerWrite); + private List valuesToWrite = new ArrayList<>(valuesPerWrite); + private List valuesToDelete = new ArrayList<>(valuesPerWrite); - protected boolean isParseForTemplate = false; - protected CharSequence templatePath = null; - protected Node rootNodeForTemplate = null; - protected Node currentNodeForTemplate = null; - protected Document documentForTemplate = null; - protected Map placeholderValues = null; //contains map of values for corresponding placeholders (eg. ${key}) in the entity xml data file. + private boolean isParseForTemplate = false; + private CharSequence templatePath = null; + private Node rootNodeForTemplate = null; + private Node currentNodeForTemplate = null; + private Document documentForTemplate = null; + private Map placeholderValues = null; //contains map of values for corresponding placeholders (eg. ${key}) in the entity xml data file. protected EntitySaxReader() {} @@ -161,7 +160,6 @@ public class EntitySaxReader extends DefaultHandler { } public void setDisableEeca(boolean disableEeca) { - this.disableEeca = disableEeca; if (disableEeca) { if (this.ecaHandler == null) { this.ecaHandler = delegator.getEntityEcaHandler(); @@ -174,14 +172,10 @@ public class EntitySaxReader extends DefaultHandler { } } - public void setAction(Action action) { + private void setAction(Action action) { this.currentAction = action; } - public Action getAction() { - return this.currentAction; - } - public long parse(String content) throws SAXException, java.io.IOException { if (content == null) { Debug.logWarning("content was null, doing nothing", module); @@ -213,7 +207,7 @@ public class EntitySaxReader extends DefaultHandler { return numberRead; } - public long parse(InputStream is, String docDescription) throws SAXException, java.io.IOException { + private long parse(InputStream is, String docDescription) throws SAXException, java.io.IOException { SAXParser parser; try { parser = SAXParserFactory.newInstance().newSAXParser(); @@ -257,7 +251,7 @@ public class EntitySaxReader extends DefaultHandler { return numberRead; } - protected void writeValues(List valuesToWrite) throws GenericEntityException { + private void writeValues(List valuesToWrite) throws GenericEntityException { if (this.checkDataOnly) { EntityDataAssert.checkValueList(valuesToWrite, delegator, this.getMessageList()); } else {