提交 c4bbfa8f authored 作者: Thomas Mueller's avatar Thomas Mueller

Android API support (work in progress).

上级 b958adc8
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version
* 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group
*/
package android.content;
/**
* TODO
*/
public class ContentResolver {
// empty
}
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version
* 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group
*/
package android.content;
/**
* A key-value pair.
*/
public class ContentValues {
// TODO
}
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version
* 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group
*/
package android.content;
/**
* TODO
*/
public class Context {
/**
* The file may only be accessed by this application, or by application with the same user ID.
*/
public static final int MODE_PRIVATE = 0;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version 1.0,
and under the Eclipse Public License, Version 1.0
(http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"><p>
This package contains classes that are needed to compile the H2 Android database API.
</p></body></html>
\ No newline at end of file
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version
* 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group
*/
package android.database;
/**
* This class implements some of the cursor operations.
*/
public abstract class AbstractCursor implements Cursor {
// empty
}
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version
* 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group
*/
package android.database;
/**
* The base class for a database cursor.
*/
public abstract class AbstractWindowedCursor extends AbstractCursor {
// empty
}
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version
* 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group
*/
package android.database;
/**
* TODO
*/
public class CharArrayBuffer {
// empty
}
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version
* 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group
*/
package android.database;
/**
* TODO
*/
public class ContentObserver {
// empty
}
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version
* 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group
*/
package android.database;
import android.content.ContentResolver;
import android.net.Uri;
import android.os.Bundle;
/**
* This interface allows to access the rows in a result set.
*/
public interface Cursor {
/**
* Get the row count.
*
* @return the row count
*/
int getCount();
/**
* Deactivate the cursor. The cursor can be re-activated using requery().
*/
void deactivate();
/**
* Get the column index. The first column is 0.
*
* @param columnName the name of the column
* @return the column index, or -1 if the column was not found
*/
int getColumnIndex(String columnName);
/**
* Close the cursor.
*/
void close();
/**
* Get the column names.
*
* @return the column names
*/
String[] getColumnNames();
/**
* Register a data set observer.
*
* @param observer the observer
*/
void registerDataSetObserver(DataSetObserver observer);
/**
* Re-run the query.
*
* @return TODO
*/
boolean requery();
/**
* Move the cursor by the given number of rows forward or backward.
*
* @param offset the row offset
* @return true if the operation was successful
*/
boolean move(int offset);
/**
* TODO
*/
void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer);
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
byte[] getBlob(int columnIndex);
/**
* Get the number of columns in the result.
*
* @return the column count
*/
int getColumnCount();
/**
* Get the column index for the given column name, or throw an exception if
* not found.
*
* @param columnName the column name
* @return the index
*/
int getColumnIndexOrThrow(String columnName);
/**
* Get the name of the given column.
*
* @param columnIndex the column index (0, 1,...)
* @return the name
*/
String getColumnName(int columnIndex);
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
double getDouble(int columnIndex);
/**
* TODO
*
* @return TODO
*/
Bundle getExtras();
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
float getFloat(int columnIndex);
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
int getInt(int columnIndex);
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
long getLong(int columnIndex);
/**
* Get the current row number
*
* @return the row number TODO 0, 1,...
*/
int getPosition();
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
short getShort(int columnIndex);
/**
* Get the value from the current row.
*
* @param columnIndex the column index (0, 1,...)
* @return the value
*/
String getString(int columnIndex);
/**
* The method onMove is only called if this method returns true.
*
* @return true if calling onMove is required
*/
boolean getWantsAllOnMoveCalls();
/**
* Check if the current position is past the last row.
*
* @return true if it is
*/
boolean isAfterLast();
/**
* Check if the current position is before the first row.
*
* @return true if it is
*/
boolean isBeforeFirst();
/**
* Check if the cursor is closed.
*
* @return true if it is
*/
boolean isClosed();
/**
* Check if the current position is on the first row.
*
* @return true if it is
*/
boolean isFirst();
/**
* Check if the current position is on the last row.
*
* @return true if it is
*/
boolean isLast();
/**
* Check if the value of the current row is null.
*
* @param columnIndex the column index (0, 1,...)
* @return true if it is
*/
boolean isNull(int columnIndex);
/**
* Move to the first row.
*
* @return TODO
*/
boolean moveToFirst();
/**
* Move to the last row.
*
* @return TODO
*/
boolean moveToLast();
/**
* Move to the next row.
*
* @return TODO
*/
boolean moveToNext();
/**
* Move to the given row.
*
* @param position TODO
* @return TODO
*/
boolean moveToPosition(int position);
/**
* Move to the previous row.
*
* @return TODO
*/
boolean moveToPrevious();
/**
* TODO
*
* @param observer TODO
*/
void registerContentObserver(ContentObserver observer);
/**
* TODO
*
* @param extras TODO
* @return TODO
*/
Bundle respond(Bundle extras);
/**
* TODO
*
* @param cr TODO
* @param uri TODO
*/
void setNotificationUri(ContentResolver cr, Uri uri);
/**
* TODO
*
* @param observer TODO
*/
void unregisterContentObserver(ContentObserver observer);
/**
* TODO
*
* @param observer TODO
*/
void unregisterDataSetObserver(DataSetObserver observer);
}
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version
* 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group
*/
package android.database;
/**
* An instance of this class can contain multiple rows.
*/
public class CursorWindow {
// empty
}
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version
* 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group
*/
package android.database;
/**
* A listener for changes in a data set.
*/
public abstract class DataSetObserver {
// empty
}
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version
* 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group
*/
package android.database;
/**
* A database exception.
*/
public class SQLException extends Exception {
private static final long serialVersionUID = 1L;
public SQLException() {
super();
}
public SQLException(String error) {
super(error);
}
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version 1.0,
and under the Eclipse Public License, Version 1.0
(http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"><p>
This package contains classes that are needed to compile the H2 Android database API.
</p></body></html>
\ No newline at end of file
/*
* Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version
* 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html). Initial Developer: H2 Group
*/
package android.database.sqlite;
/**
* An object that can be closed.
*/
public abstract class SQLiteClosable {
// empty
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2010 H2 Group. Multiple-Licensed under the H2 License, Version 1.0,
and under the Eclipse Public License, Version 1.0
(http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Javadoc package documentation
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"><p>
This package contains classes that are needed to compile the H2 Android database API.
</p></body></html>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论