Example usage for org.apache.ibatis.session SqlSession insert

List of usage examples for org.apache.ibatis.session SqlSession insert

Introduction

In this page you can find the example usage for org.apache.ibatis.session SqlSession insert.

Prototype

int insert(String statement, Object parameter);

Source Link

Document

Execute an insert statement with the given parameter object.

Usage

From source file:org.mobicents.servlet.restcomm.dao.mybatis.MybatisApplicationsDao.java

License:Open Source License

@Override
public void addApplication(final Application application) {
    final SqlSession session = sessions.openSession();
    try {//from w w w.j av  a 2 s .c o  m
        session.insert(namespace + "addApplication", toMap(application));
        session.commit();
    } finally {
        session.close();
    }
}

From source file:org.mobicents.servlet.restcomm.dao.mybatis.MybatisAvailablePhoneNumbersDao.java

License:Open Source License

@Override
public void addAvailablePhoneNumber(final AvailablePhoneNumber availablePhoneNumber) {
    final SqlSession session = sessions.openSession();
    try {/*from ww w  . ja v a2s  .c om*/
        session.insert(namespace + "addAvailablePhoneNumber", toMap(availablePhoneNumber));
        session.commit();
    } finally {
        session.close();
    }
}

From source file:org.mobicents.servlet.restcomm.dao.mybatis.MybatisCallDetailRecordsDao.java

License:Open Source License

@Override
public void addCallDetailRecord(final CallDetailRecord cdr) {
    final SqlSession session = sessions.openSession();
    try {//  w ww. ja  va 2 s  .  co m
        session.insert(namespace + "addCallDetailRecord", toMap(cdr));
        session.commit();
    } finally {
        session.close();
    }
}

From source file:org.mobicents.servlet.restcomm.dao.mybatis.MybatisClientsDao.java

License:Open Source License

@Override
public void addClient(final Client client) {
    final SqlSession session = sessions.openSession();
    try {//from w  w  w  . jav  a 2s.co m
        session.insert(namespace + "addClient", toMap(client));
        session.commit();
    } finally {
        session.close();
    }
}

From source file:org.mobicents.servlet.restcomm.dao.mybatis.MybatisConferenceDetailRecordsDao.java

License:Open Source License

@Override
public void addConferenceDetailRecord(ConferenceDetailRecord cdr) {
    final SqlSession session = sessions.openSession();
    try {/*from   w  w  w  .jav  a  2 s . c  o m*/
        session.insert(namespace + "addConferenceDetailRecord", toMap(cdr));
        session.commit();
    } finally {
        session.close();
    }
}

From source file:org.mobicents.servlet.restcomm.dao.mybatis.MybatisGatewaysDao.java

License:Open Source License

@Override
public void addGateway(final Gateway gateway) {
    final SqlSession session = sessions.openSession();
    try {// w w  w . j  a va2 s  . com
        session.insert(namespace + "addGateway", toMap(gateway));
        session.commit();
    } finally {
        session.close();
    }
}

From source file:org.mobicents.servlet.restcomm.dao.mybatis.MybatisHttpCookiesDao.java

License:Open Source License

@Override
public void addCookie(final Sid sid, final Cookie cookie) {
    final SqlSession session = sessions.openSession();
    try {//from  www  .j a va2 s.  com
        session.insert(namespace + "addCookie", toMap(sid, cookie));
        session.commit();
    } finally {
        session.close();
    }
}

From source file:org.mobicents.servlet.restcomm.dao.mybatis.MybatisIncomingPhoneNumbersDao.java

License:Open Source License

@Override
public void addIncomingPhoneNumber(final IncomingPhoneNumber incomingPhoneNumber) {
    final SqlSession session = sessions.openSession();
    try {/*from  w w  w.j a  v  a 2  s.com*/
        session.insert(namespace + "addIncomingPhoneNumber", toMap(incomingPhoneNumber));
        session.commit();
    } finally {
        session.close();
    }
}

From source file:org.mobicents.servlet.restcomm.dao.mybatis.MybatisInstanceIdDao.java

License:Open Source License

@Override
public void addInstancecId(InstanceId instanceId) {
    final SqlSession session = sessions.openSession();
    try {//from   w  ww  .j a v  a2s.c  o m
        session.insert(namespace + "addInstanceId", toMap(instanceId));
        session.commit();
    } finally {
        session.close();
    }
}

From source file:org.mobicents.servlet.restcomm.dao.mybatis.MybatisNotificationsDao.java

License:Open Source License

@Override
public void addNotification(final Notification notification) {
    final SqlSession session = sessions.openSession();
    try {/*from  ww w.  ja va  2 s  . co m*/
        session.insert(namespace + "addNotification", toMap(notification));
        session.commit();
    } finally {
        session.close();
    }
}