public static void main( String[] args ) throws IntactException { CvMapping mapping = new CvMapping(); try { log.debug( "Database: " + IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getBaseDao().getDbName() ); long start = System.currentTimeMillis(); mapping.loadFile( new File( args[ 0 ] )); long stop = System.currentTimeMillis(); log.debug( "Loading time: " + ( stop - start ) + "ms" ); } catch (SQLException e) { e.printStackTrace(); } } }
System.out.println("Database instance: " + IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getBaseDao().getDbName()); System.out.println("User: " + IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getBaseDao().getDbUserName());
private Connection getConnection() { BaseDao dao = daoFactory.getBaseDao(); con = ((Session) dao.getSession()).connection(); return con; }
public static void main( String[] args ) throws IntactException { CvMapping mapping = new CvMapping(); try { log.debug( "Database: " + IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getBaseDao().getDbName() ); long start = System.currentTimeMillis(); mapping.loadFile( new File( args[ 0 ] )); long stop = System.currentTimeMillis(); log.debug( "Loading time: " + ( stop - start ) + "ms" ); } catch (SQLException e) { e.printStackTrace(); } } }
System.out.println("Database instance: " + IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getBaseDao().getDbName()); System.out.println("User: " + IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getBaseDao().getDbUserName()); } catch (SQLException e) { System.out.println("ERROR: Could not get database information (instance name and username).");
public static void main( String[] args ) throws IntactException { CvMapping mapping = new CvMapping(); try { log.debug( "Database: " + IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getBaseDao().getDbName() ); long start = System.currentTimeMillis(); mapping.loadFile( new File( args[ 0 ] )); long stop = System.currentTimeMillis(); log.debug( "Loading time: " + ( stop - start ) + "ms" ); } catch (SQLException e) { e.printStackTrace(); } } }
System.out.println( "Database: " + daoFactory.getBaseDao().getDbName() ); System.out.println( "User: " + daoFactory.getBaseDao().getDbUserName() ); CvTopic topic = daoFactory.getCvObjectDao( CvTopic.class ).getByShortLabel( "author-confidence" ); IntactContext.getCurrentInstance().getDataContext().commitTransaction();
System.out.println( "Database: " + dao.getDbName() ); System.out.println( "Username: " + IntactContext.getCurrentInstance().getUserContext().getUserId() );
ps.println( "Database: " + dao.getDbName() ); ps.println( "User: " + dao.getDbUserName() );
System.out.println( "Database: " + dao.getDbName() ); System.out.println( "Username: " + IntactContext.getCurrentInstance().getUserContext().getUserId() );
System.out.println( "Database: " + dao.getDbName() ); System.out.println( "Username: " + IntactContext.getCurrentInstance().getUserContext().getUserId() );
String db = dao.getDbName(); System.out.println( "Database: " + db ); System.out.println( "User: " + IntactContext.getCurrentInstance().getUserContext().getUserId());
String db = dao.getDbName(); System.out.println( "Database: " + db ); System.out.println( "User: " + IntactContext.getCurrentInstance().getUserContext().getUserId());
String db = dao.getDbName(); System.out.println( "Database: " + db ); System.out.println( "User: " + IntactContext.getCurrentInstance().getUserContext().getUserId());
log.debug( "Database: " + getDaoFactory().getBaseDao().getDbName() );