diff --git a/src/main/java/com/syncleus/ferma/WrappedTransaction.java b/src/main/java/com/syncleus/ferma/WrappedTransaction.java index adc7794071abd64d041b77b15939a59cd1def9c1..282ffdc94845fc9e5433602f220becd27f927a5c 100644 --- a/src/main/java/com/syncleus/ferma/WrappedTransaction.java +++ b/src/main/java/com/syncleus/ferma/WrappedTransaction.java @@ -100,13 +100,13 @@ public interface WrappedTransaction extends AutoCloseable { /** * Returns the raw wrapped tinkerpop transaction. - * @return + * @return wrapped tinkerpop transaction. */ Transaction getDelegate(); /** * Returns the parent graph for the transaction. - * @return + * @return parent graph. */ WrappedFramedGraph<? extends Graph> getGraph(); } diff --git a/src/main/java/com/syncleus/ferma/tx/FramedTxGraph.java b/src/main/java/com/syncleus/ferma/tx/FramedTxGraph.java index 5a327b52f357f9b8c19e1fcf6d6fa82bf85f394a..8027d4cb1eea228d93824eb92112932ac4fc16be 100644 --- a/src/main/java/com/syncleus/ferma/tx/FramedTxGraph.java +++ b/src/main/java/com/syncleus/ferma/tx/FramedTxGraph.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.syncleus.ferma.tx; import com.syncleus.ferma.FramedGraph; @@ -27,7 +42,7 @@ public interface FramedTxGraph extends FramedGraph { /** * Create a new transaction. * - * @return + * @return new transaction. */ Tx createTx(); diff --git a/src/main/java/com/syncleus/ferma/tx/Tx.java b/src/main/java/com/syncleus/ferma/tx/Tx.java index acbcff73caac3e069ace84481ecbdb6157835caf..6925d450aeaa048fd960f463cf1ecc358c2d84c6 100644 --- a/src/main/java/com/syncleus/ferma/tx/Tx.java +++ b/src/main/java/com/syncleus/ferma/tx/Tx.java @@ -63,8 +63,6 @@ public interface Tx extends WrappedTransaction { /** * Invoke rollback or commit when closing the autoclosable. By default a rollback will be invoked. - * - * @throws IOException */ @Override void close(); diff --git a/src/main/java/com/syncleus/ferma/tx/TxAction.java b/src/main/java/com/syncleus/ferma/tx/TxAction.java index f946e58e422dab1003fcf12b86dc26ec0ead875e..ed00251282620b3cf691bebb83e42dcab9359ea3 100644 --- a/src/main/java/com/syncleus/ferma/tx/TxAction.java +++ b/src/main/java/com/syncleus/ferma/tx/TxAction.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.syncleus.ferma.tx; @FunctionalInterface diff --git a/src/main/java/com/syncleus/ferma/tx/TxAction0.java b/src/main/java/com/syncleus/ferma/tx/TxAction0.java index e354e99043e4159d34b1ada34ce2cbe6b07d4f82..c8a2f85e4db89ad3f22ccad64cff683e6e45de1d 100644 --- a/src/main/java/com/syncleus/ferma/tx/TxAction0.java +++ b/src/main/java/com/syncleus/ferma/tx/TxAction0.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.syncleus.ferma.tx; @FunctionalInterface diff --git a/src/main/java/com/syncleus/ferma/tx/TxAction1.java b/src/main/java/com/syncleus/ferma/tx/TxAction1.java index 75efc341f931487c4a29f71ea244ca387c11e760..6d7735077feed65d95d8cfdbcf38bd1c97d0ef69 100644 --- a/src/main/java/com/syncleus/ferma/tx/TxAction1.java +++ b/src/main/java/com/syncleus/ferma/tx/TxAction1.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.syncleus.ferma.tx; @FunctionalInterface diff --git a/src/main/java/com/syncleus/ferma/tx/TxAction2.java b/src/main/java/com/syncleus/ferma/tx/TxAction2.java index c2afdf41031d0115fd4146eada3acff7505f47a5..14d29312604bfa5358af2197bc88ee3279e7b446 100644 --- a/src/main/java/com/syncleus/ferma/tx/TxAction2.java +++ b/src/main/java/com/syncleus/ferma/tx/TxAction2.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.syncleus.ferma.tx; @FunctionalInterface diff --git a/src/main/java/com/syncleus/ferma/tx/TxFactory.java b/src/main/java/com/syncleus/ferma/tx/TxFactory.java index b93809d027508312d27c6b0b0c9fc19a1bd604f6..286fc1211cde920d694fc575f7212d21e29a7c3c 100644 --- a/src/main/java/com/syncleus/ferma/tx/TxFactory.java +++ b/src/main/java/com/syncleus/ferma/tx/TxFactory.java @@ -49,16 +49,18 @@ public interface TxFactory { /** * Create a new transaction. * - * @return + * @return new transaction. */ Tx createTx(); + /** - * Execute the txHandler within the scope of a transaction and call + * Execute the txHandler within the scope of a transaction and call * the result handler once the transaction handler code has finished. - * + * * @param txHandler * Handler that will be executed within the scope of the transaction. + * @param <T> Type of the object returned by the handler * @return Object which was returned by the handler */ <T> T tx(TxAction<T> txHandler); @@ -80,6 +82,7 @@ public interface TxFactory { * * @param txHandler * Handler that will be executed within the scope of the transaction. + * @param <T> type of the object returned by the handler. * @return Result of the handler */ default <T> T tx(TxAction1<T> txHandler) { diff --git a/src/main/java/com/syncleus/ferma/tx/WrappedFramedTxGraph.java b/src/main/java/com/syncleus/ferma/tx/WrappedFramedTxGraph.java index 384d01e91842296392b2613d78aaba1593ff59b0..ee31c73694e2417e57a3eee634aab1eac0e3a68c 100644 --- a/src/main/java/com/syncleus/ferma/tx/WrappedFramedTxGraph.java +++ b/src/main/java/com/syncleus/ferma/tx/WrappedFramedTxGraph.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.syncleus.ferma.tx; import org.apache.tinkerpop.gremlin.structure.Graph; diff --git a/src/test/java/com/syncleus/ferma/tx/DummyGraph.java b/src/test/java/com/syncleus/ferma/tx/DummyGraph.java index a14e3ea6bd688cc1e543c7748f854c366cd7cbfc..b1dc7673a18f68a5d16d9ef08669f40dcc0b9e74 100644 --- a/src/test/java/com/syncleus/ferma/tx/DummyGraph.java +++ b/src/test/java/com/syncleus/ferma/tx/DummyGraph.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.syncleus.ferma.tx; import org.apache.tinkerpop.gremlin.structure.Graph; diff --git a/src/test/java/com/syncleus/ferma/tx/DummyTransaction.java b/src/test/java/com/syncleus/ferma/tx/DummyTransaction.java index 4924d0be4a8d70f2ef54c427d814caabb4a98a00..d7fa735b55dc60a017d95e30ea2dfa98ee48deb3 100644 --- a/src/test/java/com/syncleus/ferma/tx/DummyTransaction.java +++ b/src/test/java/com/syncleus/ferma/tx/DummyTransaction.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.syncleus.ferma.tx; import org.apache.tinkerpop.gremlin.structure.Graph; diff --git a/src/test/java/com/syncleus/ferma/tx/TxFactoryTest.java b/src/test/java/com/syncleus/ferma/tx/TxFactoryTest.java index d79f46114c3bec3446005017ab46f290b4517588..018faf5478e9ab684aaabaf4ab1ebe93b323b436 100644 --- a/src/test/java/com/syncleus/ferma/tx/TxFactoryTest.java +++ b/src/test/java/com/syncleus/ferma/tx/TxFactoryTest.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.syncleus.ferma.tx; import static org.junit.Assert.assertEquals;