| File | Line |
|---|
| org/jcreme/sql/WrappedResultSet.java | 137 |
| org/jcreme/sql/WrappedStatement.java | 163 |
message = message + ": \n" + e.getMessage();
SQLException exc = null;
if ((this.exceptionHandler != null)
&& (this.exceptionHandler.isDeadLock(e))) {
exc = generateDeadLockException(message, e);
} else if ((this.exceptionHandler != null)
&& (this.exceptionHandler.isLossOfConnection(e))) {
exc = generateConnectionLostException(message, e);
} else {
exc = generateNewException(message, e);
}
exc.setNextException(e);
return exc;
}
/**
* This method generates a DeadLockException from an SQLException.
*
* @param message
* the message to append.
* @param e
* the original exception.
* @return a DeadLockException with the given message.
*/
protected DeadLockException generateDeadLockException(String message,
SQLException e) {
return new DeadLockException(message, e.getSQLState(), e.getErrorCode());
}
/**
* This method generates a ConnectionLostException from an SQLException.
*
* @param message
* the message to append.
* @param e
* the original exception.
* @return a ConnectionLostException with the given message.
*/
protected ConnectionLostException generateConnectionLostException(
String message, SQLException e) {
return new ConnectionLostException(message, e.getSQLState(), e
.getErrorCode());
}
/**
* This method generates a new SQLException from an SQLException.
*
* @param message
* the message to append.
* @param e
* the original exception.
* @return a new SQLException with the given message.
*/
protected SQLException generateNewException(String message, SQLException e) {
return new SQLException(message, e.getSQLState(), e.getErrorCode());
}
/**
* This method generates a BatchUpdateException from an SQLException.
*
* @param message
* the message to append.
* @param e
* the original exception.
* @return a BatchUpdateException with the given message.
*/
protected SQLException generateNewException(String message, |
| File | Line |
|---|
| org/jcreme/swing/table/colormodel/BaseCyclingColorModel.java | 165 |
| org/jcreme/swing/table/colormodel/LineTitlesColorModel.java | 236 |
fireTableColorModelChanged(new TableColorModelEvent(this));
}
}
/**
* This method enables to change the color used as background for selected
* cells.
*
* @param bgSelectedColor
* the new background for selected cells.
*/
public void setBackgroundSelectedColor(Color bgSelectedColor) {
if (((bgSelectedColor == null) && (this.backgroundSelectedColor != null))
|| ((bgSelectedColor != null) && ((this.backgroundSelectedColor == null) || (!this.backgroundSelectedColor
.equals(bgSelectedColor))))) {
this.backgroundSelectedColor = bgSelectedColor;
fireTableColorModelChanged(new TableColorModelEvent(this));
}
}
/**
* This method enables to change the color used as foreground for selected
* cells.
*
* @param fgSelectedColor
* the new foreground for selected cells.
*/
public void setForegroundSelectedColor(Color fgSelectedColor) {
if (((fgSelectedColor == null) && (this.foregroundSelectedColor != null))
|| ((fgSelectedColor != null) && ((this.foregroundSelectedColor == null) || (!this.foregroundSelectedColor
.equals(fgSelectedColor))))) {
this.foregroundSelectedColor = fgSelectedColor;
fireTableColorModelChanged(new TableColorModelEvent(this));
}
} |
| File | Line |
|---|
| org/jcreme/sql/WrappedStatement.java | 728 |
| org/jcreme/sql/WrappedStatement.java | 817 |
return this.realStatement.execute(sql, autoGeneratedKeys);
} catch (SQLException e) {
CremeAction redo = null;
try {
Class[] types = { java.lang.String.class, Integer.TYPE };
Object[] params = { this.baseQuery,
new Integer(autoGeneratedKeys) };
redo = new CremeAction(getClass().getMethod("executeUpdate",
types));
redo.setSubject(this);
redo.setParameters(params);
} catch (NoSuchMethodException ex) {
ex.printStackTrace();
} catch (IllegalArgumentException ex) {
ex.printStackTrace();
}
manageException(e, redo);
if ((redo != null) && (redo.isSuccessfull())) {
return ((Boolean) redo.getResult()).booleanValue(); |
| File | Line |
|---|
| org/jcreme/sql/WrappedStatement.java | 788 |
| org/jcreme/sql/WrappedStatement.java | 875 |
return this.realStatement.execute(sql, columnNames);
} catch (SQLException e) {
CremeAction redo = null;
try {
Class[] types = { java.lang.String.class, String[].class };
Object[] params = { this.baseQuery, columnNames };
redo = new CremeAction(getClass().getMethod("executeUpdate",
types));
redo.setSubject(this);
redo.setParameters(params);
} catch (NoSuchMethodException ex) {
ex.printStackTrace();
} catch (IllegalArgumentException ex) {
ex.printStackTrace();
}
manageException(e, redo);
if ((redo != null) && (redo.isSuccessfull())) {
return ((Boolean) redo.getResult()).booleanValue(); |
| File | Line |
|---|
| org/jcreme/sql/WrappedStatement.java | 759 |
| org/jcreme/sql/WrappedStatement.java | 846 |
return this.realStatement.execute(sql, columnIndexes);
} catch (SQLException e) {
CremeAction redo = null;
try {
Class[] types = { java.lang.String.class, int[].class };
Object[] params = { this.baseQuery, columnIndexes };
redo = new CremeAction(getClass().getMethod("executeUpdate",
types));
redo.setSubject(this);
redo.setParameters(params);
} catch (NoSuchMethodException ex) {
ex.printStackTrace();
} catch (IllegalArgumentException ex) {
ex.printStackTrace();
}
manageException(e, redo);
if ((redo != null) && (redo.isSuccessfull())) {
return ((Boolean) redo.getResult()).booleanValue(); |
| File | Line |
|---|
| org/jcreme/caches/HashCache.java | 140 |
| org/jcreme/caches/LUFOCache.java | 258 |
}
/**
* This method gives access to the full content of the cache.
*
* @return an array containing all the objects stored in the cache.
*/
public synchronized Object[] getAllObjects() {
return this.values.values().toArray();
}
/**
* This method gives the same result as the getAllObjects method but the
* objects in the result array are types with the parameter type.
*
* @param type
* the type to give to the object in the result array.
* @return an array of objects of the type.
*/
public synchronized Object[] getAllObjects(final Class type) {
return this.values.values().toArray(
(Object[]) java.lang.reflect.Array.newInstance(type,
this.values.size()));
}
/**
* This method enables to access to the cache contents.
*
* @return a map of the (key,value) contents of the cache.
*/
public synchronized Map getMap() {
return (Map) this.values.clone();
}
/**
* This is a convenience method. It enables to add to the cache all the
* objects present in the map.
*
* @param m
* the map that contains the objects (and keys) to use.
*/
public synchronized void registerAllObjects(final Map m) {
if (m != null) { |
| File | Line |
|---|
| org/jcreme/sql/WrappedStatement.java | 823 |
| org/jcreme/sql/WrappedStatement.java | 851 |
Object[] params = { this.baseQuery, columnIndexes };
redo = new CremeAction(getClass().getMethod("executeUpdate",
types));
redo.setSubject(this);
redo.setParameters(params);
} catch (NoSuchMethodException ex) {
ex.printStackTrace();
} catch (IllegalArgumentException ex) {
ex.printStackTrace();
}
manageException(e, redo);
if ((redo != null) && (redo.isSuccessfull())) {
return ((Boolean) redo.getResult()).booleanValue();
}
throw generateException(e);
}
}
/**
* @see Statement#execute(java.lang.String, java.lang.String[])
*/
public boolean execute(String sql, String[] columnNames) |
| File | Line |
|---|
| org/jcreme/sql/WrappedStatement.java | 734 |
| org/jcreme/sql/WrappedStatement.java | 764 |
Object[] params = { this.baseQuery, columnIndexes };
redo = new CremeAction(getClass().getMethod("executeUpdate",
types));
redo.setSubject(this);
redo.setParameters(params);
} catch (NoSuchMethodException ex) {
ex.printStackTrace();
} catch (IllegalArgumentException ex) {
ex.printStackTrace();
}
manageException(e, redo);
if ((redo != null) && (redo.isSuccessfull())) {
return ((Integer) redo.getResult()).intValue();
}
throw generateException(e);
}
}
/**
* @see Statement#executeUpdate(java.lang.String, java.lang.String[])
*/
public int executeUpdate(String sql, String[] columnNames) |
| File | Line |
|---|
| org/jcreme/swing/table/colormodel/ChangeHighlightingColorModel.java | 152 |
| org/jcreme/swing/table/colormodel/ChangeHighlightingColorModel.java | 189 |
result = this.underlyingModel.getForegroundColor(row, column,
selected, renderer);
}
synchronized (this.changeEvents) {
Iterator iter = this.changeEvents.iterator();
TableModelEvent evt = null;
while (iter.hasNext()) {
evt = (TableModelEvent) iter.next();
if ((row >= evt.getFirstRow())
&& (row <= evt.getLastRow())
&& ((evt.getColumn() == TableModelEvent.ALL_COLUMNS) || (column == evt
.getColumn()))) {
result = this.foregroundHighlightColor; |
| File | Line |
|---|
| org/jcreme/sql/WrappedStatement.java | 851 |
| org/jcreme/sql/WrappedStatement.java | 880 |
Object[] params = { this.baseQuery, columnNames };
redo = new CremeAction(getClass().getMethod("executeUpdate",
types));
redo.setSubject(this);
redo.setParameters(params);
} catch (NoSuchMethodException ex) {
ex.printStackTrace();
} catch (IllegalArgumentException ex) {
ex.printStackTrace();
}
manageException(e, redo);
if ((redo != null) && (redo.isSuccessfull())) {
return ((Boolean) redo.getResult()).booleanValue();
}
throw generateException(e);
}
}
/**
* @see Statement#getResultSetHoldability()
*/
public int getResultSetHoldability() throws SQLException { |
| File | Line |
|---|
| org/jcreme/sql/WrappedStatement.java | 317 |
| org/jcreme/sql/WrappedStatement.java | 734 |
Object[] params = { this.baseQuery, columnNames };
redo = new CremeAction(getClass().getMethod("executeUpdate",
types));
redo.setSubject(this);
redo.setParameters(params);
} catch (NoSuchMethodException ex) {
ex.printStackTrace();
} catch (IllegalArgumentException ex) {
ex.printStackTrace();
}
manageException(e, redo);
if ((redo != null) && (redo.isSuccessfull())) {
return ((Integer) redo.getResult()).intValue();
}
throw generateException(e);
}
}
/**
* @see Statement#execute(java.lang.String, int)
*/
public boolean execute(String sql, int autoGeneratedKeys) |