This file contains hidden or 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
package interceptor; | |
import java.lang.annotation.Inherited; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
/** | |
* @author Gabriel Francisco - [email protected] | |
*/ | |
@Retention(RetentionPolicy.RUNTIME) |
This file contains hidden or 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
interface Command<T>{ | |
void execute(T context); | |
} | |
class Chain<T>{ | |
private List<Command<T>> commands; | |
public Chain(List<Command<T>> commands){ | |
this.commands = commands; | |
} |
This file contains hidden or 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
package org.apache.openejb.tomee.boot; | |
import javax.ejb.EJB; | |
import javax.inject.Inject; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.core.Response; | |
/** | |
* @author Gabriel Francisco - [email protected] |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<persistence xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence | |
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> | |
<persistence-unit name="my-persistent-unit" transaction-type="JTA"> | |
<provider>org.hibernate.ejb.HibernatePersistence</provider> | |
<jta-data-source>dataSource</jta-data-source> | |
<properties> |
This file contains hidden or 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
public class Repository<T> | |
public Repository<T> fromEntity(){ | |
return this; | |
} | |
public Where<T> where(){ | |
Map<String, Object> parameters = new HashMap<String, Object>; | |
return new Where<T>(parameters); | |
} | |
NewerOlder