package ru.bitel.bgbilling.modules.tv.dyn.tv24h;

import java.sql.Connection;

import ru.bitel.bgbilling.kernel.script.server.dev.GlobalScriptBase;
import ru.bitel.bgbilling.modules.tv.common.bean.TvDevice;
import ru.bitel.bgbilling.modules.tv.server.bean.TvDeviceDao;
import ru.bitel.bgbilling.server.util.Setup;
import ru.bitel.common.sql.ConnectionSet;

public class Tv24hSync
    extends GlobalScriptBase
{
    @Override
    public void execute( Setup setup, ConnectionSet connectionSet )
        throws Exception
    {
        try ( Connection con = connectionSet.getConnection();
             TvDeviceDao tvDeviceDao = new TvDeviceDao( con, 0 ) )
        {
            TvDevice tvDevice = tvDeviceDao.get( 3 );
            System.out.println( tvDevice.getSecret() );
        }
    }
}
