com.bixuebihui.algorithm.RemoveActionImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of c-dbtools Show documentation
Show all versions of c-dbtools Show documentation
a fast small database connection pool and a active record flavor mini framework
package com.bixuebihui.algorithm;
import com.bixuebihui.sql.PooledPreparedStatement;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.SQLException;
/**
* RemoveActionImpl class.
*
* @author xingwx
* @version $Id: $Id
*/
public class RemoveActionImpl implements IRemoveAction {
private static final Logger LOG = LoggerFactory.getLogger(RemoveActionImpl.class);
/**
* {@inheritDoc}
*/
@Override
public boolean actionAfterRemove(Object val) {
if(val instanceof PooledPreparedStatement){
try {
((PooledPreparedStatement)val).getStatement().close();
LOG.debug("Debug-RemoveActionImpl-PooledPreparedStatement.close()");
} catch (SQLException e) {
LOG.warn("",e);
}
}else{
LOG.debug("Debug-RemoveActionImpl.actionAfterRemove.close()");
}
return false;
}
}