From d8b3b01004d7fa71658275822f569783f1c62047 Mon Sep 17 00:00:00 2001 From: "Niels Erik G. Nielsen" Date: Wed, 5 Jun 2013 16:00:22 -0400 Subject: [PATCH] Includes sp extension in cloning of record cmd --- .../com/indexdata/mkjsf/pazpar2/commands/RecordCommand.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/RecordCommand.java b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/RecordCommand.java index e9c4b54..c9df610 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/RecordCommand.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/RecordCommand.java @@ -15,6 +15,7 @@ public class RecordCommand extends Pazpar2Command implements ServiceProxyCommand private static final long serialVersionUID = 2817539422114569506L; private static Logger logger = Logger.getLogger(RecordCommand.class); + private RecordCommandSp spCommand = null; public RecordCommand() { super("record"); @@ -118,6 +119,7 @@ public class RecordCommand extends Pazpar2Command implements ServiceProxyCommand for (String parameterName : parameters.keySet()) { newCommand.setParameterInState(parameters.get(parameterName).copy()); } + newCommand.spCommand = this.spCommand; return newCommand; } @@ -127,7 +129,10 @@ public class RecordCommand extends Pazpar2Command implements ServiceProxyCommand * */ public RecordCommandSp getSp () { - return new RecordCommandSp(this); + if (spCommand==null) { + spCommand = new RecordCommandSp(this); + } + return spCommand; } @Override -- 1.7.10.4