Back to project page android-sqlite-server.
The source code is released under:
Apache License
If you think the Android project android-sqlite-server listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.devtcg.sqliteserver.impl.binder.protocol; //w w w . j a va 2 s . c o m import android.os.Bundle; import org.devtcg.sqliteserver.impl.SQLiteExecutor; import org.devtcg.sqliteserver.impl.binder.ClientTransactor; import org.devtcg.sqliteserver.impl.binder.ServerImpl; import org.devtcg.sqliteserver.impl.binder.ServerState; public class EndTransactionCommand { public static class EndTransactionMessage extends AbstractCommandMessage { public EndTransactionMessage(ClientTransactor transactor) { super(transactor, MethodName.END_TRANSACTION); } @Override protected Bundle onBuildRequest(Bundle request) { return request; } @Override protected void onParseResponse(Bundle response) { // Nothing to do... } } public static class EndTransactionHandler extends AbstractCommandHandler { public EndTransactionHandler(ServerImpl serverImpl) { super(serverImpl); } @Override protected Bundle onHandle(Bundle request) { getExecutor().endTransaction(); ServerState state = getServerState(); if (state.numTransactions == 0) { throw new IllegalStateException("Expected SQLiteDatabase#endTransaction to throw"); } state.numTransactions--; return null; } } }