/** * When the Object is being loaded from the database this constructor will be used to set all * values * * @param parentBashNode Must not be null. * @param script New script to default. * @param id Database ID */ public Bash(BashNode parentBashNode, String script, Integer id) { if (parentBashNode == null) { Error.BASH_NODE_PARENT_NULL.record().create(); throw new NullPointerException(); } else { this.parentBashNode = parentBashNode; this.script = script; this.id = id; } }
/** * Default creation that will set the script to the default value. * * @param parentBashNode Must not be null. */ public Bash(BashNode parentBashNode) { if (parentBashNode == null) { Error.BASH_NODE_PARENT_NULL.record().create(); throw new NullPointerException(); } else { this.parentBashNode = parentBashNode; this.script = defaultScript; } }