public LargeObject copy() throws SQLException { return new LargeObject(fp, oid, mode); }
public LargeObject copy() throws SQLException { return new LargeObject(fp, oid, mode); }
/** * This opens an existing large object, based on its OID. * * @param oid of large object * @param mode mode of open * @param commitOnClose commit the transaction when this LOB will be closed * @return LargeObject instance providing access to the object * @throws SQLException on error */ public LargeObject open(long oid, int mode, boolean commitOnClose) throws SQLException { if (conn.getAutoCommit()) { throw new PSQLException(GT.tr("Large Objects may not be used in auto-commit mode."), PSQLState.NO_ACTIVE_SQL_TRANSACTION); } return new LargeObject(fp, oid, mode, conn, commitOnClose); }
/** * This opens an existing large object, based on its OID * * @param oid of large object * @param mode mode of open * @return LargeObject instance providing access to the object * @exception SQLException on error */ public LargeObject open(long oid, int mode) throws SQLException { if (conn.getAutoCommit()) throw new PSQLException(GT.tr("Large Objects may not be used in auto-commit mode."), PSQLState.NO_ACTIVE_SQL_TRANSACTION); return new LargeObject(fp, oid, mode); }
public LargeObject get(String s) { synchronized(map) { LargeObject ret = map.get(s); if (ret == null) map.put(s, ret = new LargeObject(s)); return ret; } }
public LargeObject copy() throws SQLException { return new LargeObject(fp, oid, mode); }
public LargeObject copy() throws SQLException { return new LargeObject(fp, oid, mode); }
public enum LargeObjectCache { INSTANCE; private final ConcurrentMap<String, LargeObject> map = new ConcurrentHashMap<...>(); public LargeObject get(String s) { LargeObject value = map.get(s); if (value == null) { value = new LargeObject(s); LargeObject old = value.putIfAbsent(s, value); if (old != null) { value = old; } } return value; } }
/** * This opens an existing large object, based on its OID * * @param oid of large object * @param mode mode of open * @return LargeObject instance providing access to the object * @exception SQLException on error */ public LargeObject open(long oid, int mode) throws SQLException { if (conn.getAutoCommit()) throw new PSQLException(GT.tr("Large Objects may not be used in auto-commit mode."), PSQLState.NO_ACTIVE_SQL_TRANSACTION); return new LargeObject(fp, oid, mode); }
/** * This opens an existing large object, based on its OID * * @param oid of large object * @param mode mode of open * @return LargeObject instance providing access to the object * @exception SQLException on error */ public LargeObject open(long oid, int mode) throws SQLException { if (conn.getAutoCommit()) throw new PSQLException(GT.tr("Large Objects may not be used in auto-commit mode."), PSQLState.NO_ACTIVE_SQL_TRANSACTION); return new LargeObject(fp, oid, mode); }