-/*******************************************************************************\r
- * Copyright (c) 2010- Association for Decentralized Information Management in\r
- * Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- * \r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.databoard.accessor.impl;\r
-\r
-import org.simantics.databoard.accessor.CloseableAccessor;\r
-import org.simantics.databoard.accessor.error.AccessorException;\r
-\r
-public class ClosableCompositeRecord extends CompositeRecord implements CloseableAccessor {\r
-\r
- public interface CloseListener {\r
- void onClosed(CompositeRecord sender) throws AccessorException;\r
- }\r
- \r
- CloseListener closeListener;\r
- \r
- public ClosableCompositeRecord() {\r
- super();\r
- }\r
- \r
- public ClosableCompositeRecord(CloseListener closeListener) {\r
- super();\r
- this.closeListener = closeListener;\r
- }\r
- \r
- public void setCloseListener(CloseListener closeListener) {\r
- this.closeListener = closeListener;\r
- }\r
-\r
- @Override\r
- public void close() throws AccessorException {\r
- if (closeListener!=null) closeListener.onClosed(this);\r
- }\r
-\r
-}\r
-\r
+/*******************************************************************************
+ * Copyright (c) 2010- Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.databoard.accessor.impl;
+
+import org.simantics.databoard.accessor.CloseableAccessor;
+import org.simantics.databoard.accessor.error.AccessorException;
+
+public class ClosableCompositeRecord extends CompositeRecord implements CloseableAccessor {
+
+ public interface CloseListener {
+ void onClosed(CompositeRecord sender) throws AccessorException;
+ }
+
+ CloseListener closeListener;
+
+ public ClosableCompositeRecord() {
+ super();
+ }
+
+ public ClosableCompositeRecord(CloseListener closeListener) {
+ super();
+ this.closeListener = closeListener;
+ }
+
+ public void setCloseListener(CloseListener closeListener) {
+ this.closeListener = closeListener;
+ }
+
+ @Override
+ public void close() throws AccessorException {
+ if (closeListener!=null) closeListener.onClosed(this);
+ }
+
+}
+