Package com.music.model.persistent

Examples of com.music.model.persistent.PiecePlay


        return result;
    }

    @Transactional
    public void storePlay(long pieceId, Long userId, String ip, boolean mobileApp) {
        PiecePlay play = new PiecePlay();
        play.setDateTime(new DateTime());
        play.setMobileApp(mobileApp);
        if (userId != null) {
            play.setUser(dao.getById(User.class, userId));
        }
        Piece piece = dao.getById(Piece.class, pieceId);
        play.setPiece(piece);
        play.setIp(ip);
        dao.persist(play);

        if (piece.isNewlyCreated()) {
            // we don't care about isolation here - 2 or more users can get (and
            // set new=false to) the same piece and that's OK
View Full Code Here

TOP

Related Classes of com.music.model.persistent.PiecePlay

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.