Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
416 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...ime-config/src/test/java/com/speedment/runtime/config/identifier/TableIdentifierTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,32 @@ | |||
/* | |||
* To change this license header, choose License Headers in Project Properties. | |||
* To change this template file, choose Tools | Templates | |||
* and open the template in the editor. | |||
*/ | |||
package com.speedment.runtime.config.identifier; | |||
|
|||
import org.junit.Test; | |||
import static org.junit.Assert.*; | |||
|
|||
/** | |||
* | |||
* @author Per Minborg | |||
*/ | |||
public class TableIdentifierTest { | |||
|
|||
@Test | |||
public void testOf() { | |||
final String db = "db"; | |||
final String sc = "sc"; | |||
final String ta = "ta"; | |||
|
|||
TableIdentifier<Integer> ti0 = TableIdentifier.of(db, sc, ta); | |||
TableIdentifier<Integer> ti1 = TableIdentifier.of(db, sc, ta); | |||
TableIdentifier<Integer> ti2 = TableIdentifier.of(db, sc, "Arne"); | |||
|
|||
assertTrue(ti0 == ti1); // Make sure that the interface interns duplicates | |||
assertFalse(ti0 == ti2); | |||
|
|||
} | |||
|
|||
} |
24 changes: 24 additions & 0 deletions
24
...e-core/src/main/java/com/speedment/runtime/core/component/SqlStreamSupplierComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,24 @@ | |||
/* | |||
* To change this license header, choose License Headers in Project Properties. | |||
* To change this template file, choose Tools | Templates | |||
* and open the template in the editor. | |||
*/ | |||
package com.speedment.runtime.core.component; | |||
|
|||
import java.sql.ResultSet; | |||
|
|||
/** | |||
* | |||
* @author Per Minborg | |||
*/ | |||
public interface SqlStreamSupplierComponent extends StreamSupplierComponent { | |||
|
|||
public interface Support<ENTITY> { | |||
|
|||
String getSql(); | |||
|
|||
ENTITY from(ResultSet rs); | |||
|
|||
} | |||
|
|||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.