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
IOException
public User getUser(int id) throws IOException
IOException
public void deleteUser(int id) throws IOException
IOException
public List<User> getUsers() throws IOException
IOException
Copyright © 2016. All rights reserved.