Skip to content

Instantly share code, notes, and snippets.

@masazdream
Created July 1, 2014 08:50
Show Gist options
  • Select an option

  • Save masazdream/944d59cc14d31cdb75ca to your computer and use it in GitHub Desktop.

Select an option

Save masazdream/944d59cc14d31cdb75ca to your computer and use it in GitHub Desktop.
Doma Appconfig
public class Main {
public static void main(String[] args){
LocalTransaction tx = AppConfig.getLocalTransaction();
try{
tx.begin();
BetaDomaTableDao dao = new BetaDomaTableDaoImpl();
BetaDoma betaDomaTable = dao.selectById(2);
betaDomaTable.message = "renew message 更新したよ!";
betaDomaTable.number = 10000;
dao.update(betaDomaTable);
tx.commit();
}finally{
// トランザクション
tx.rollback();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment