public class UserDao extends Object
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
ADDRESS_COL |
static byte[] |
COL_FAMILY |
static byte[] |
EMAIL_COL |
static byte[] |
NAME_COL |
static byte[] |
PHONE_COL |
static byte[] |
TABLE_NAME |
| Constructor and Description |
|---|
UserDao(org.apache.hadoop.hbase.client.HConnection conn) |
| Modifier and Type | Method and Description |
|---|---|
void |
addUser(int id,
String name,
String address,
String email,
String phone) |
void |
deleteUser(int id) |
User |
getUser(int id) |
List<User> |
getUsers() |
public static final byte[] TABLE_NAME
public static final byte[] COL_FAMILY
public static final byte[] NAME_COL
public static final byte[] ADDRESS_COL
public static final byte[] EMAIL_COL
public static final byte[] PHONE_COL
public void addUser(int id,
String name,
String address,
String email,
String phone)
throws IOException
IOExceptionpublic User getUser(int id) throws IOException
IOExceptionpublic void deleteUser(int id)
throws IOException
IOExceptionpublic List<User> getUsers() throws IOException
IOExceptionCopyright © 2016. All rights reserved.