Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GameToGameTitleConnection; new DAOs; new BaseLists-Classes; new JUnit…
…-Tests
- Loading branch information
kultpower
committed
Jan 13, 2014
1 parent
eeef4a9
commit ab14217
Showing
19 changed files
with
549 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.oregami.data; | ||
|
||
import java.util.List; | ||
|
||
import javax.persistence.EntityManager; | ||
|
||
import org.oregami.entities.GameTitle; | ||
|
||
import com.google.inject.Inject; | ||
import com.google.inject.Provider; | ||
|
||
public class GameTitleDao extends GenericDAOImpl<GameTitle, Long>{ | ||
|
||
@Inject | ||
public GameTitleDao(Provider<EntityManager> emf) { | ||
super(emf); | ||
entityClass=GameTitle.class; | ||
} | ||
|
||
|
||
@SuppressWarnings("unchecked") | ||
public List<GameTitle> findByExactName(String name) { | ||
List<GameTitle> gameTitleList = getEntityManager() | ||
.createNativeQuery("SELECT * FROM GameTitle t where lower(t.nativeSpelling) = :value ", GameTitle.class).setParameter("value", name.toLowerCase()).getResultList(); | ||
return gameTitleList; | ||
} | ||
|
||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.oregami.data; | ||
|
||
import javax.persistence.EntityManager; | ||
|
||
import org.oregami.entities.datalist.TitleType; | ||
|
||
import com.google.inject.Inject; | ||
import com.google.inject.Provider; | ||
|
||
public class TitleTypeDao extends BaseListDao<TitleType>{ | ||
|
||
@Inject | ||
public TitleTypeDao(Provider<EntityManager> emf) { | ||
super(emf); | ||
entityClass=TitleType.class; | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.