text:
package com.hazelcast.simulator.tests.map.helpers;

import com.hazelcast.nio.serialization.Portable;
import com.hazelcast.nio.serialization.PortableReader;
import com.hazelcast.nio.serialization.PortableWriter;

import java.io.IOException;

import static java.lang.String.format;

@SuppressWarnings({"unused", "checkstyle:explicitinitialization", "checkstyle:methodcount", "checkstyle:methodlength",
        "checkstyle:methodname", "checkstyle:membername", "checkstyle:parametername"})
public class ComplexDomainObject implements Portable {

    public static final int PORTABLE_FACTORY_ID = 10000002;
    public static final int PORTABLE_CLASS_ID = 1;

    public int UUID = 1;

    public long locality_id = -1L;
    public String locality_name = "";
    public long division_id = -1L;
    public String division_name = "";
    public long brand_id = -1L;
    public String brand_name = "";
    public long media_id = -1L;
    public String media_name = "";
    public int media_content_approval_instruction = 0;
    public int media_qc_approval_instruction = 0;
    public int media_clock_approval_instruction = 0;
    public int media_class_approval_instruction = 0;
    public int media_instruction_approval_instruction = 0;
    public int media_house_nr_instruction = 0;
    public boolean media_music_report_required = false;
    public int media_delivery_hours = 0;
    public long media_destination_id = -1L;
    public long media_slave_destination_id = -1L;

    public long copy_code_id = -1L;
    public long region_id = -1L;
    public long media_type_media_extension_id = -1L;
    public String copy_code = "";
    public boolean aired = false;
    public long poster_id = -1L;
    public int film_length = 0;
    public long first_air_date = -1;
    public int content_type = 0;
    public String title = "";
    public boolean stopped = false;
    public boolean request_upload = false;
    public long urr_time = -1;

    public long sponsorship_locality_id = -1L;
    public long sponsorship_division_id = -1L;
    public long music_report_request_time = -1;
    public int music_report_request_count = 0;
    public int music_to_report = 0;
    public boolean music_report_completed = false;
    public long music_report_completed_time = -1;
    public boolean music_report_completed_action = false;
    public String media_agency_planning = "";
    public String media_agency_buying = "";
    public String creative_agency = "";
    public String production_agency = "";
    public String post_production_agency = "";
    public String other_agency = "";
    public boolean disabled_for_upload = false;

    public String media_house_nr = "";
    public String b_p_code = "";
    public boolean created_from_mismatch = false;
    public boolean delivered_from_elsewhere = false;
    public long media_first_air_date = -1;
    public long delivery_deadline = -1;
    public long delivery_deadline_ms_algo = -1;
    public boolean inactive = false;

    public long copy_envelope_id = -1L;
    public int copy_envelope_action_state = 0;
    public long expiration_time = -1;
    public long copy_envelope_sender_id = -1L;
    public long approval_advert_user_id = -1L;
    public long approval_advert_time = -1;
    public int approval_advert_state = 0;
    public int quality_check_state = 0;
    public int proxy_creation_state = 0;
    public long qc_proxy_approval_time = -1;
    public boolean transcoding = false;

    public long delivery_id = -1L;
    public int delivery_action_state = 0;
    public long time_delivered = -1;
    public long slave_time_delivered = -1;
    public long pre_delivered_time = -1;
    public long slave_pre_delivered_time = -1;
    public long post_delivered_time = -1;
    public long slave_post_delivered_time = -1;

    public long content_approval_media_user_id = -1L;
    public long content_approval_media_time = -1;
    public int content_approval_media_state = 0;

    public long qc_approval_media_user_id = -1L;
    public long qc_approval_media_time = -1;
    public int qc_approval_media_state = 0;

    public long clock_approval_media_user_id = -1L;
    public long clock_approval_media_time = -1;
    public int clock_approval_media_state = 0;

    public long class_approval_media_user_id = -1L;
    public long class_approval_media_time = -1;
    public int class_approval_media_state = 0;
    public int num_instruction_approved = 0;
    public int num_instruction_rejected = 0;
    public int num_instruction_approval_not_performed = 0;
    public long download_speed = -1;
    public int mismatch = 0;
    public boolean mismatch_ignored = false;
    public int invoice_account_demand = 0;

    public ComplexDomainObject() {
    }

    @SuppressWarnings({"checkstyle:executablestatementcount", "checkstyle:parameternumber"})
    public ComplexDomainObject(int UUID, long locality_id, String locality_name,
                               long division_id, String division_name, long brand_id,
                               String brand_name, long media_id, String media_name,
                               int media_content_approval_instruction,
                               int media_qc_approval_instruction,
                               int media_clock_approval_instruction,
                               int media_class_approval_instruction,
                               int media_instruction_approval_instruction,
                               int media_house_nr_instruction,
                               boolean media_music_report_required, int media_delivery_hours,
                               long media_destination_id, long media_slave_destination_id,
                               long copy_code_id, long region_id,
                               long media_type_media_extension_id, String copy_code,
                               boolean aired, long poster_id, int film_length,
                               long first_air_date, int content_type, String title,
                               boolean stopped, boolean request_upload, long urr_time,
                               long sponsorship_locality_id, long sponsorship_division_id,
                               long music_report_request_time, int music_report_request_count,
                               int music_to_report, boolean music_report_completed,
                               long music_report_completed_time,
                               boolean music_report_completed_action,
                               String media_agency_planning, String media_agency_buying,
                               String creative_agency, String production_agency,
                               String post_production_agency, String other_agency,
                               boolean disabled_for_upload, String media_house_nr,
                               String b_p_code, boolean created_from_mismatch,
                               boolean delivered_from_elsewhere, long media_first_air_date,
                               long delivery_deadline, long delivery_deadline_ms_algo,
                               boolean inactive, long copy_envelope_id,
                               int copy_envelope_action_state, long expiration_time,
                               long copy_envelope_sender_id, long approval_advert_user_id,
                               long approval_advert_time, int approval_advert_state,
                               int quality_check_state, int proxy_creation_state,
                               long qc_proxy_approval_time, boolean transcoding,
                               long delivery_id, int delivery_action_state,
                               long time_delivered, long slave_time_delivered,
                               long pre_delivered_time, long slave_pre_delivered_time,
                               long post_delivered_time, long slave_post_delivered_time,
                               long content_approval_media_user_id,
                               long content_approval_media_time,
                               int content_approval_media_state,
                               long qc_approval_media_user_id, long qc_approval_media_time,
                               int qc_approval_media_state, long clock_approval_media_user_id,
                               long clock_approval_media_time, int clock_approval_media_state,
                               long class_approval_media_user_id,
                               long class_approval_media_time, int class_approval_media_state,
                               int num_instruction_approved, int num_instruction_rejected,
                               int num_instruction_approval_not_performed,
                               long download_speed, int mismatch, boolean mismatch_ignored,
                               int invoice_account_demand) {
        this.UUID = UUID;
        this.locality_id = locality_id;
        this.locality_name = locality_name;
        this.division_id = division_id;
        this.division_name = division_name;
        this.brand_id = brand_id;
        this.brand_name = brand_name;
        this.media_id = media_id;
        this.media_name = media_name;
        this.media_content_approval_instruction = media_content_approval_instruction;
        this.media_qc_approval_instruction = media_qc_approval_instruction;
        this.media_clock_approval_instruction = media_clock_approval_instruction;
        this.media_class_approval_instruction = media_class_approval_instruction;
        this.media_instruction_approval_instruction = media_instruction_approval_instruction;
        this.media_house_nr_instruction = media_house_nr_instruction;
        this.media_music_report_required = media_music_report_required;
        this.media_delivery_hours = media_delivery_hours;
        this.media_destination_id = media_destination_id;
        this.media_slave_destination_id = media_slave_destination_id;
        this.copy_code_id = copy_code_id;
        this.region_id = region_id;
        this.media_type_media_extension_id = media_type_media_extension_id;
        this.copy_code = copy_code;
        this.aired = aired;
        this.poster_id = poster_id;
        this.film_length = film_length;
        this.first_air_date = first_air_date;
        this.content_type = content_type;
        this.title = title;
        this.stopped = stopped;
        this.request_upload = request_upload;
        this.urr_time = urr_time;
        this.sponsorship_locality_id = sponsorship_locality_id;
        this.sponsorship_division_id = sponsorship_division_id;
        this.music_report_request_time = music_report_request_time;
        this.music_report_request_count = music_report_request_count;
        this.music_to_report = music_to_report;
        this.music_report_completed = music_report_completed;
        this.music_report_completed_time = music_report_completed_time;
        this.music_report_completed_action = music_report_completed_action;
        this.media_agency_planning = media_agency_planning;
        this.media_agency_buying = media_agency_buying;
        this.creative_agency = creative_agency;
        this.production_agency = production_agency;
        this.post_production_agency = post_production_agency;
        this.other_agency = other_agency;
        this.disabled_for_upload = disabled_for_upload;
        this.media_house_nr = media_house_nr;
        this.b_p_code = b_p_code;
        this.created_from_mismatch = created_from_mismatch;
        this.delivered_from_elsewhere = delivered_from_elsewhere;
        this.media_first_air_date = media_first_air_date;
        this.delivery_deadline = delivery_deadline;
        this.delivery_deadline_ms_algo = delivery_deadline_ms_algo;
        this.inactive = inactive;
        this.copy_envelope_id = copy_envelope_id;
        this.copy_envelope_action_state = copy_envelope_action_state;
        this.expiration_time = expiration_time;
        this.copy_envelope_sender_id = copy_envelope_sender_id;
        this.approval_advert_user_id = approval_advert_user_id;
        this.approval_advert_time = approval_advert_time;
        this.approval_advert_state = approval_advert_state;
        this.quality_check_state = quality_check_state;
        this.proxy_creation_state = proxy_creation_state;
        this.qc_proxy_approval_time = qc_proxy_approval_time;
        this.transcoding = transcoding;
        this.delivery_id = delivery_id;
        this.delivery_action_state = delivery_action_state;
        this.time_delivered = time_delivered;
        this.slave_time_delivered = slave_time_delivered;
        this.pre_delivered_time = pre_delivered_time;
        this.slave_pre_delivered_time = slave_pre_delivered_time;
        this.post_delivered_time = post_delivered_time;
        this.slave_post_delivered_time = slave_post_delivered_time;
        this.content_approval_media_user_id = content_approval_media_user_id;
        this.content_approval_media_time = content_approval_media_time;
        this.content_approval_media_state = content_approval_media_state;
        this.qc_approval_media_user_id = qc_approval_media_user_id;
        this.qc_approval_media_time = qc_approval_media_time;
        this.qc_approval_media_state = qc_approval_media_state;
        this.clock_approval_media_user_id = clock_approval_media_user_id;
        this.clock_approval_media_time = clock_approval_media_time;
        this.clock_approval_media_state = clock_approval_media_state;
        this.class_approval_media_user_id = class_approval_media_user_id;
        this.class_approval_media_time = class_approval_media_time;
        this.class_approval_media_state = class_approval_media_state;
        this.num_instruction_approved = num_instruction_approved;
        this.num_instruction_rejected = num_instruction_rejected;
        this.num_instruction_approval_not_performed = num_instruction_approval_not_performed;
        this.download_speed = download_speed;
        this.mismatch = mismatch;
        this.mismatch_ignored = mismatch_ignored;
        this.invoice_account_demand = invoice_account_demand;
    }

    @Override
    public int getClassId() {
        return PORTABLE_CLASS_ID;
    }

    @Override
    public int getFactoryId() {
        return PORTABLE_FACTORY_ID;
    }

    @Override
    public void writePortable(PortableWriter out) throws IOException {
        out.writeInt("UUID", UUID);

        out.writeLong("locality_id", locality_id);
        out.writeUTF("locality_name", locality_name);
        out.writeLong("division_id", division_id);
        out.writeUTF("division_name", division_name);
        out.writeLong("brand_id", brand_id);
        out.writeUTF("brand_name", brand_name);
        out.writeLong("media_id", media_id);
        out.writeUTF("media_name", media_name);
        out.writeInt("media_content_approval_instruction", media_content_approval_instruction);
        out.writeInt("media_qc_approval_instruction", media_qc_approval_instruction);
        out.writeInt("media_clock_approval_instruction", media_clock_approval_instruction);
        out.writeInt("media_class_approval_instruction", media_class_approval_instruction);
        out.writeInt("media_instruction_approval_instruction", media_instruction_approval_instruction);
        out.writeInt("media_house_nr_instruction", media_house_nr_instruction);
        out.writeBoolean("media_music_report_required", media_music_report_required);
        out.writeInt("media_delivery_hours", media_delivery_hours);
        out.writeLong("media_destination_id", media_destination_id);
        out.writeLong("media_slave_destination_id", media_slave_destination_id);

        out.writeLong("copy_code_id", copy_code_id);
        out.writeLong("region_id", region_id);
        out.writeLong("media_type_media_extension_id", media_type_media_extension_id);
        out.writeUTF("copy_code", copy_code);
        out.writeBoolean("aired", aired);
        out.writeLong("poster_id", poster_id);
        out.writeInt("film_length", film_length);
        out.writeLong("first_air_date", first_air_date);
        out.writeInt("content_type", content_type);
        out.writeUTF("title", title);
        out.writeBoolean("stopped", stopped);
        out.writeBoolean("request_upload", request_upload);
        out.writeLong("urr_time", urr_time);

        out.writeLong("sponsorship_locality_id", sponsorship_locality_id);
        out.writeLong("sponsorship_division_id", sponsorship_division_id);
        out.writeLong("music_report_request_time", music_report_request_time);
        out.writeInt("music_report_request_count", music_report_request_count);
        out.writeInt("music_to_report", music_to_report);
        out.writeBoolean("music_report_completed", music_report_completed);
        out.writeLong("music_report_completed_time", music_report_completed_time);
        out.writeBoolean("music_report_completed_action", music_report_completed_action);
        out.writeUTF("media_agency_planning", media_agency_planning);
        out.writeUTF("media_agency_buying", media_agency_buying);
        out.writeUTF("creative_agency", creative_agency);
        out.writeUTF("production_agency", production_agency);
        out.writeUTF("post_production_agency", post_production_agency);
        out.writeUTF("other_agency", other_agency);
        out.writeBoolean("disabled_for_upload", disabled_for_upload);

        out.writeUTF("media_house_nr", media_house_nr);
        out.writeUTF("b_p_code", b_p_code);
        out.writeBoolean("created_from_mismatch", created_from_mismatch);
        out.writeBoolean("delivered_from_elsewhere", delivered_from_elsewhere);
        out.writeLong("media_first_air_date", media_first_air_date);
        out.writeLong("delivery_deadline", delivery_deadline);
        out.writeLong("delivery_deadline_ms_algo", delivery_deadline_ms_algo);
        out.writeBoolean("inactive", inactive);

        out.writeLong("copy_envelope_id", copy_envelope_id);
        out.writeInt("copy_envelope_action_state", copy_envelope_action_state);
        out.writeLong("expiration_time", expiration_time);
        out.writeLong("copy_envelope_sender_id", copy_envelope_sender_id);
        out.writeLong("approval_advert_user_id", approval_advert_user_id);
        out.writeLong("approval_advert_time", approval_advert_time);
        out.writeInt("approval_advert_state", approval_advert_state);
        out.writeInt("quality_check_state", quality_check_state);
        out.writeInt("proxy_creation_state", proxy_creation_state);
        out.writeLong("qc_proxy_approval_time", qc_proxy_approval_time);
        out.writeBoolean("transcoding", transcoding);

        out.writeLong("delivery_id", delivery_id);
        out.writeInt("delivery_action_state", delivery_action_state);
        out.writeLong("time_delivered", time_delivered);
        out.writeLong("slave_time_delivered", slave_time_delivered);
        out.writeLong("pre_delivered_time", pre_delivered_time);
        out.writeLong("slave_pre_delivered_time", slave_pre_delivered_time);
        out.writeLong("post_delivered_time", post_delivered_time);
        out.writeLong("slave_post_delivered_time", slave_post_delivered_time);

        out.writeLong("content_approval_media_user_id", content_approval_media_user_id);
        out.writeLong("content_approval_media_time", content_approval_media_time);
        out.writeInt("content_approval_media_state", content_approval_media_state);

        out.writeLong("qc_approval_media_user_id", qc_approval_media_user_id);
        out.writeLong("qc_approval_media_time", qc_approval_media_time);
        out.writeInt("qc_approval_media_state", qc_approval_media_state);

        out.writeLong("clock_approval_media_user_id", clock_approval_media_user_id);
        out.writeLong("clock_approval_media_time", clock_approval_media_time);
        out.writeInt("clock_approval_media_state", clock_approval_media_state);

        out.writeLong("class_approval_media_user_id", class_approval_media_user_id);
        out.writeLong("class_approval_media_time", class_approval_media_time);
        out.writeInt("class_approval_media_state", class_approval_media_state);
        out.writeInt("num_instruction_approved", num_instruction_approved);
        out.writeInt("num_instruction_rejected", num_instruction_rejected);
        out.writeInt("num_instruction_approval_not_performed", num_instruction_approval_not_performed);
        out.writeLong("download_speed", download_speed);
        out.writeInt("mismatch", mismatch);
        out.writeBoolean("mismatch_ignored", mismatch_ignored);
        out.writeInt("invoice_account_demand", invoice_account_demand);
    }

    public void readPortable(PortableReader in) throws IOException {
        UUID = in.readInt("UUID");
        locality_id = in.readLong("locality_id");
        locality_name = in.readUTF("locality_name");
        division_id = in.readLong("division_id");
        division_name = in.readUTF("division_name");
        brand_id = in.readLong("brand_id");
        brand_name = in.readUTF("brand_name");
        media_id = in.readLong("media_id");
        media_name = in.readUTF("media_name");
        media_content_approval_instruction = in.readInt("media_content_approval_instruction");
        media_qc_approval_instruction = in.readInt("media_qc_approval_instruction");
        media_clock_approval_instruction = in.readInt("media_clock_approval_instruction");
        media_class_approval_instruction = in.readInt("media_class_approval_instruction");
        media_instruction_approval_instruction = in.readInt("media_instruction_approval_instruction");
        media_house_nr_instruction = in.readInt("media_house_nr_instruction");
        media_music_report_required = in.readBoolean("media_music_report_required");
        media_delivery_hours = in.readInt("media_delivery_hours");
        media_destination_id = in.readLong("media_destination_id");
        media_slave_destination_id = in.readLong("media_slave_destination_id");

        copy_code_id = in.readLong("copy_code_id");
        region_id = in.readLong("region_id");
        media_type_media_extension_id = in.readLong("media_type_media_extension_id");
        copy_code = in.readUTF("copy_code");
        aired = in.readBoolean("aired");
        poster_id = in.readLong("poster_id");
        film_length = in.readInt("film_length");
        first_air_date = in.readLong("first_air_date");
        content_type = in.readInt("content_type");
        title = in.readUTF("title");
        stopped = in.readBoolean("stopped");
        request_upload = in.readBoolean("request_upload");
        urr_time = in.readLong("urr_time");

        sponsorship_locality_id = in.readLong("sponsorship_locality_id");
        sponsorship_division_id = in.readLong("sponsorship_division_id");
        music_report_request_time = in.readLong("music_report_request_time");
        music_report_request_count = in.readInt("music_report_request_count");
        music_to_report = in.readInt("music_to_report");
        music_report_completed = in.readBoolean("music_report_completed");
        music_report_completed_time = in.readLong("music_report_completed_time");
        music_report_completed_action = in.readBoolean("music_report_completed_action");
        media_agency_planning = in.readUTF("media_agency_planning");
        media_agency_buying = in.readUTF("media_agency_buying");
        creative_agency = in.readUTF("creative_agency");
        production_agency = in.readUTF("production_agency");
        post_production_agency = in.readUTF("post_production_agency");
        other_agency = in.readUTF("other_agency");
        disabled_for_upload = in.readBoolean("disabled_for_upload");

        media_house_nr = in.readUTF("media_house_nr");
        b_p_code = in.readUTF("b_p_code");
        created_from_mismatch = in.readBoolean("created_from_mismatch");
        delivered_from_elsewhere = in.readBoolean("delivered_from_elsewhere");
        media_first_air_date = in.readLong("media_first_air_date");
        delivery_deadline = in.readLong("delivery_deadline");
        delivery_deadline_ms_algo = in.readLong("delivery_deadline_ms_algo");
        inactive = in.readBoolean("inactive");

        copy_envelope_id = in.readLong("copy_envelope_id");
        copy_envelope_action_state = in.readInt("copy_envelope_action_state");
        expiration_time = in.readLong("expiration_time");
        copy_envelope_sender_id = in.readLong("copy_envelope_sender_id");
        approval_advert_user_id = in.readLong("approval_advert_user_id");
        approval_advert_time = in.readLong("approval_advert_time");
        approval_advert_state = in.readInt("approval_advert_state");
        quality_check_state = in.readInt("quality_check_state");
        proxy_creation_state = in.readInt("proxy_creation_state");
        qc_proxy_approval_time = in.readLong("qc_proxy_approval_time");
        transcoding = in.readBoolean("transcoding");

        delivery_id = in.readLong("delivery_id");
        delivery_action_state = in.readInt("delivery_action_state");
        time_delivered = in.readLong("time_delivered");
        slave_time_delivered = in.readLong("slave_time_delivered");
        pre_delivered_time = in.readLong("pre_delivered_time");
        slave_pre_delivered_time = in.readLong("slave_pre_delivered_time");
        post_delivered_time = in.readLong("post_delivered_time");
        slave_post_delivered_time = in.readLong("slave_post_delivered_time");

        content_approval_media_user_id = in.readLong("content_approval_media_user_id");
        content_approval_media_time = in.readLong("content_approval_media_time");
        content_approval_media_state = in.readInt("content_approval_media_state");

        qc_approval_media_user_id = in.readLong("qc_approval_media_user_id");
        qc_approval_media_time = in.readLong("qc_approval_media_time");
        qc_approval_media_state = in.readInt("qc_approval_media_state");

        clock_approval_media_user_id = in.readLong("clock_approval_media_user_id");
        clock_approval_media_time = in.readLong("clock_approval_media_time");
        clock_approval_media_state = in.readInt("clock_approval_media_state");

        class_approval_media_user_id = in.readLong("class_approval_media_user_id");
        class_approval_media_time = in.readLong("class_approval_media_time");
        class_approval_media_state = in.readInt("class_approval_media_state");
        num_instruction_approved = in.readInt("num_instruction_approved");
        num_instruction_rejected = in.readInt("num_instruction_rejected");
        num_instruction_approval_not_performed = in.readInt("num_instruction_approval_not_performed");
        download_speed = in.readLong("download_speed");
        mismatch = in.readInt("mismatch");
        mismatch_ignored = in.readBoolean("mismatch_ignored");
        invoice_account_demand = in.readInt("invoice_account_demand");
    }

    public void setLocality_id(long locality_id) {
        this.locality_id = locality_id;
    }

    public void setLocality_name(String locality_name) {
        this.locality_name = locality_name;
    }

    public void setDivision_id(long division_id) {
        this.division_id = division_id;
    }

    public void setDivision_name(String division_name) {
        this.division_name = division_name;
    }

    public void setBrand_id(long brand_id) {
        this.brand_id = brand_id;
    }

    public void setBrand_name(String brand_name) {
        this.brand_name = brand_name;
    }

    public void setMedia_id(long media_id) {
        this.media_id = media_id;
    }

    public void setMedia_name(String media_name) {
        this.media_name = media_name;
    }

    public void setMedia_content_approval_instruction(
            int media_content_approval_instruction) {
        this.media_content_approval_instruction = media_content_approval_instruction;
    }

    public void setMedia_qc_approval_instruction(int media_qc_approval_instruction) {
        this.media_qc_approval_instruction = media_qc_approval_instruction;
    }

    public void setMedia_clock_approval_instruction(
            int media_clock_approval_instruction) {
        this.media_clock_approval_instruction = media_clock_approval_instruction;
    }

    public void setMedia_class_approval_instruction(
            int media_class_approval_instruction) {
        this.media_class_approval_instruction = media_class_approval_instruction;
    }

    public void setMedia_instruction_approval_instruction(
            int media_instruction_approval_instruction) {
        this.media_instruction_approval_instruction = media_instruction_approval_instruction;
    }

    public void setMedia_house_nr_instruction(int media_house_nr_instruction) {
        this.media_house_nr_instruction = media_house_nr_instruction;
    }

    public void setMedia_music_report_required(boolean media_music_report_required) {
        this.media_music_report_required = media_music_report_required;
    }

    public void setMedia_delivery_hours(int media_delivery_hours) {
        this.media_delivery_hours = media_delivery_hours;
    }

    public void setMedia_destination_id(long media_destination_id) {
        this.media_destination_id = media_destination_id;
    }

    public void setMedia_slave_destination_id(long media_slave_destination_id) {
        this.media_slave_destination_id = media_slave_destination_id;
    }

    public void setCopy_code_id(long copy_code_id) {
        this.copy_code_id = copy_code_id;
    }

    public void setRegion_id(long region_id) {
        this.region_id = region_id;
    }

    public void setMedia_type_media_extension_id(long media_type_media_extension_id) {
        this.media_type_media_extension_id = media_type_media_extension_id;
    }

    public void setCopy_code(String copy_code) {
        this.copy_code = copy_code;
    }

    public void setAired(boolean aired) {
        this.aired = aired;
    }

    public void setPoster_id(long poster_id) {
        this.poster_id = poster_id;
    }

    public void setFilm_length(int film_length) {
        this.film_length = film_length;
    }

    public void setFirst_air_date(long first_air_date) {
        this.first_air_date = first_air_date;
    }

    public void setContent_type(int content_type) {
        this.content_type = content_type;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setStopped(boolean stopped) {
        this.stopped = stopped;
    }

    public void setRequest_upload(boolean request_upload) {
        this.request_upload = request_upload;
    }

    public void setUrr_time(long urr_time) {
        this.urr_time = urr_time;
    }

    public void setSponsorship_locality_id(long sponsorship_locality_id) {
        this.sponsorship_locality_id = sponsorship_locality_id;
    }

    public void setSponsorship_division_id(long sponsorship_division_id) {
        this.sponsorship_division_id = sponsorship_division_id;
    }

    public void setMusic_report_request_time(long music_report_request_time) {
        this.music_report_request_time = music_report_request_time;
    }

    public void setMusic_report_request_count(int music_report_request_count) {
        this.music_report_request_count = music_report_request_count;
    }

    public void setMusic_to_report(int music_to_report) {
        this.music_to_report = music_to_report;
    }

    public void setMusic_report_completed(boolean music_report_completed) {
        this.music_report_completed = music_report_completed;
    }

    public void setMusic_report_completed_time(long music_report_completed_time) {
        this.music_report_completed_time = music_report_completed_time;
    }

    public void setMusic_report_completed_action(
            boolean music_report_completed_action) {
        this.music_report_completed_action = music_report_completed_action;
    }

    public void setMedia_agency_planning(String media_agency_planning) {
        this.media_agency_planning = media_agency_planning;
    }

    public void setMedia_agency_buying(String media_agency_buying) {
        this.media_agency_buying = media_agency_buying;
    }

    public void setCreative_agency(String creative_agency) {
        this.creative_agency = creative_agency;
    }

    public void setProduction_agency(String production_agency) {
        this.production_agency = production_agency;
    }

    public void setPost_production_agency(String post_production_agency) {
        this.post_production_agency = post_production_agency;
    }

    public void setOther_agency(String other_agency) {
        this.other_agency = other_agency;
    }

    public void setDisabled_for_upload(boolean disabled_for_upload) {
        this.disabled_for_upload = disabled_for_upload;
    }

    public void setMedia_house_nr(String media_house_nr) {
        this.media_house_nr = media_house_nr;
    }

    public void setB_p_code(String b_p_code) {
        this.b_p_code = b_p_code;
    }

    public void setCreated_from_mismatch(boolean created_from_mismatch) {
        this.created_from_mismatch = created_from_mismatch;
    }

    public void setDelivered_from_elsewhere(boolean delivered_from_elsewhere) {
        this.delivered_from_elsewhere = delivered_from_elsewhere;
    }

    public void setMedia_first_air_date(long media_first_air_date) {
        this.media_first_air_date = media_first_air_date;
    }

    public void setDelivery_deadline(long delivery_deadline) {
        this.delivery_deadline = delivery_deadline;
    }

    public void setDelivery_deadline_ms_algo(long delivery_deadline_ms_algo) {
        this.delivery_deadline_ms_algo = delivery_deadline_ms_algo;
    }

    public void setInactive(boolean inactive) {
        this.inactive = inactive;
    }

    public void setCopy_envelope_id(long copy_envelope_id) {
        this.copy_envelope_id = copy_envelope_id;
    }

    public void setCopy_envelope_action_state(int copy_envelope_action_state) {
        this.copy_envelope_action_state = copy_envelope_action_state;
    }

    public void setExpiration_time(long expiration_time) {
        this.expiration_time = expiration_time;
    }

    public void setCopy_envelope_sender_id(long copy_envelope_sender_id) {
        this.copy_envelope_sender_id = copy_envelope_sender_id;
    }

    public void setApproval_advert_user_id(long approval_advert_user_id) {
        this.approval_advert_user_id = approval_advert_user_id;
    }

    public void setApproval_advert_time(long approval_advert_time) {
        this.approval_advert_time = approval_advert_time;
    }

    public void setApproval_advert_state(int approval_advert_state) {
        this.approval_advert_state = approval_advert_state;
    }

    public void setQuality_check_state(int quality_check_state) {
        this.quality_check_state = quality_check_state;
    }

    public void setProxy_creation_state(int proxy_creation_state) {
        this.proxy_creation_state = proxy_creation_state;
    }

    public void setQc_proxy_approval_time(long qc_proxy_approval_time) {
        this.qc_proxy_approval_time = qc_proxy_approval_time;
    }

    public void setTranscoding(boolean transcoding) {
        this.transcoding = transcoding;
    }

    public void setDelivery_id(long delivery_id) {
        this.delivery_id = delivery_id;
    }

    public void setDelivery_action_state(int delivery_action_state) {
        this.delivery_action_state = delivery_action_state;
    }

    public void setTime_delivered(long time_delivered) {
        this.time_delivered = time_delivered;
    }

    public void setSlave_time_delivered(long slave_time_delivered) {
        this.slave_time_delivered = slave_time_delivered;
    }

    public void setPre_delivered_time(long pre_delivered_time) {
        this.pre_delivered_time = pre_delivered_time;
    }

    public void setSlave_pre_delivered_time(long slave_pre_delivered_time) {
        this.slave_pre_delivered_time = slave_pre_delivered_time;
    }

    public void setPost_delivered_time(long post_delivered_time) {
        this.post_delivered_time = post_delivered_time;
    }

    public void setSlave_post_delivered_time(long slave_post_delivered_time) {
        this.slave_post_delivered_time = slave_post_delivered_time;
    }

    public void setContent_approval_media_user_id(
            long content_approval_media_user_id) {
        this.content_approval_media_user_id = content_approval_media_user_id;
    }

    public void setContent_approval_media_time(long content_approval_media_time) {
        this.content_approval_media_time = content_approval_media_time;
    }

    public void setContent_approval_media_state(int content_approval_media_state) {
        this.content_approval_media_state = content_approval_media_state;
    }

    public void setQc_approval_media_user_id(long qc_approval_media_user_id) {
        this.qc_approval_media_user_id = qc_approval_media_user_id;
    }

    public void setQc_approval_media_time(long qc_approval_media_time) {
        this.qc_approval_media_time = qc_approval_media_time;
    }

    public void setQc_approval_media_state(int qc_approval_media_state) {
        this.qc_approval_media_state = qc_approval_media_state;
    }

    public void setClock_approval_media_user_id(long clock_approval_media_user_id) {
        this.clock_approval_media_user_id = clock_approval_media_user_id;
    }

    public void setClock_approval_media_time(long clock_approval_media_time) {
        this.clock_approval_media_time = clock_approval_media_time;
    }

    public void setClock_approval_media_state(int clock_approval_media_state) {
        this.clock_approval_media_state = clock_approval_media_state;
    }

    public void setClass_approval_media_user_id(long class_approval_media_user_id) {
        this.class_approval_media_user_id = class_approval_media_user_id;
    }

    public void setClass_approval_media_time(long class_approval_media_time) {
        this.class_approval_media_time = class_approval_media_time;
    }

    public void setClass_approval_media_state(int class_approval_media_state) {
        this.class_approval_media_state = class_approval_media_state;
    }

    public void setNum_instruction_approved(int num_instruction_approved) {
        this.num_instruction_approved = num_instruction_approved;
    }

    public void setNum_instruction_rejected(int num_instruction_rejected) {
        this.num_instruction_rejected = num_instruction_rejected;
    }

    public void setNum_instruction_approval_not_performed(int num_instruction_approval_not_performed) {
        this.num_instruction_approval_not_performed = num_instruction_approval_not_performed;
    }

    public void setDownload_speed(long download_speed) {
        this.download_speed = download_speed;
    }

    public void setMismatch(int mismatch) {
        this.mismatch = mismatch;
    }

    public void setMismatch_ignored(boolean mismatch_ignored) {
        this.mismatch_ignored = mismatch_ignored;
    }

    public void setInvoice_account_demand(int invoice_account_demand) {
        this.invoice_account_demand = invoice_account_demand;
    }

    public String getQuickSearchKey() {
        return format("%d_%d_%d", copy_code_id, media_id, brand_id);
    }

    @Override
    @SuppressWarnings({"checkstyle:npathcomplexity", "checkstyle:cyclomaticcomplexity"})
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (aired ? 1231 : 1237);
        result = prime * result + approval_advert_state;
        result = prime * result + (int) (approval_advert_time ^ (approval_advert_time >>> 32));
        result = prime * result + (int) (approval_advert_user_id ^ (approval_advert_user_id >>> 32));
        result = prime * result + ((b_p_code == null) ? 0 : b_p_code.hashCode());
        result = prime * result + (int) (brand_id ^ (brand_id >>> 32));
        result = prime * result + ((brand_name == null) ? 0 : brand_name.hashCode());
        result = prime * result + class_approval_media_state;
        result = prime * result + (int) (class_approval_media_time ^ (class_approval_media_time >>> 32));
        result = prime * result + (int) (class_approval_media_user_id ^ (class_approval_media_user_id >>> 32));
        result = prime * result + clock_approval_media_state;
        result = prime * result + (int) (clock_approval_media_time ^ (clock_approval_media_time >>> 32));
        result = prime * result + (int) (clock_approval_media_user_id ^ (clock_approval_media_user_id >>> 32));
        result = prime * result + content_approval_media_state;
        result = prime * result + (int) (content_approval_media_time ^ (content_approval_media_time >>> 32));
        result = prime * result + (int) (content_approval_media_user_id ^ (content_approval_media_user_id >>> 32));
        result = prime * result + content_type;
        result = prime * result + ((copy_code == null) ? 0 : copy_code.hashCode());
        result = prime * result + (int) (copy_code_id ^ (copy_code_id >>> 32));
        result = prime * result + copy_envelope_action_state;
        result = prime * result + (int) (copy_envelope_id ^ (copy_envelope_id >>> 32));
        result = prime * result + (int) (copy_envelope_sender_id ^ (copy_envelope_sender_id >>> 32));
        result = prime * result + (created_from_mismatch ? 1231 : 1237);
        result = prime * result + ((creative_agency == null) ? 0 : creative_agency.hashCode());
        result = prime * result + (delivered_from_elsewhere ? 1231 : 1237);
        result = prime * result + delivery_action_state;
        result = prime * result + (int) (delivery_deadline ^ (delivery_deadline >>> 32));
        result = prime * result + (int) (delivery_deadline_ms_algo ^ (delivery_deadline_ms_algo >>> 32));
        result = prime * result + (int) (delivery_id ^ (delivery_id >>> 32));
        result = prime * result + (disabled_for_upload ? 1231 : 1237);
        result = prime * result + (int) (division_id ^ (division_id >>> 32));
        result = prime * result + ((division_name == null) ? 0 : division_name.hashCode());
        result = prime * result + (int) (download_speed ^ (download_speed >>> 32));
        result = prime * result + (int) (expiration_time ^ (expiration_time >>> 32));
        result = prime * result + film_length;
        result = prime * result + (int) (first_air_date ^ (first_air_date >>> 32));
        result = prime * result + (inactive ? 1231 : 1237);
        result = prime * result + invoice_account_demand;
        result = prime * result + (int) (locality_id ^ (locality_id >>> 32));
        result = prime * result + ((locality_name == null) ? 0 : locality_name.hashCode());
        result = prime * result + ((media_agency_buying == null) ? 0 : media_agency_buying.hashCode());
        result = prime * result + ((media_agency_planning == null) ? 0 : media_agency_planning.hashCode());
        result = prime * result + media_class_approval_instruction;
        result = prime * result + media_clock_approval_instruction;
        result = prime * result + media_content_approval_instruction;
        result = prime * result + media_delivery_hours;
        result = prime * result + (int) (media_destination_id ^ (media_destination_id >>> 32));
        result = prime * result + (int) (media_first_air_date ^ (media_first_air_date >>> 32));
        result = prime * result + ((media_house_nr == null) ? 0 : media_house_nr.hashCode());
        result = prime * result + media_house_nr_instruction;
        result = prime * result + (int) (media_id ^ (media_id >>> 32));
        result = prime * result + media_instruction_approval_instruction;
        result = prime * result + (media_music_report_required ? 1231 : 1237);
        result = prime * result + ((media_name == null) ? 0 : media_name.hashCode());
        result = prime * result + media_qc_approval_instruction;
        result = prime * result + (int) (media_slave_destination_id ^ (media_slave_destination_id >>> 32));
        result = prime * result + (int) (media_type_media_extension_id ^ (media_type_media_extension_id >>> 32));
        result = prime * result + mismatch;
        result = prime * result + (mismatch_ignored ? 1231 : 1237);
        result = prime * result + (music_report_completed ? 1231 : 1237);
        result = prime * result + (music_report_completed_action ? 1231 : 1237);
        result = prime * result + (int) (music_report_completed_time ^ (music_report_completed_time >>> 32));
        result = prime * result + music_report_request_count;
        result = prime * result + (int) (music_report_request_time ^ (music_report_request_time >>> 32));
        result = prime * result + music_to_report;
        result = prime * result + num_instruction_approval_not_performed;
        result = prime * result + num_instruction_approved;
        result = prime * result + num_instruction_rejected;
        result = prime * result + ((other_agency == null) ? 0 : other_agency.hashCode());
        result = prime * result + (int) (post_delivered_time ^ (post_delivered_time >>> 32));
        result = prime * result + ((post_production_agency == null) ? 0 : post_production_agency.hashCode());
        result = prime * result + (int) (poster_id ^ (poster_id >>> 32));
        result = prime * result + (int) (pre_delivered_time ^ (pre_delivered_time >>> 32));
        result = prime * result + ((production_agency == null) ? 0 : production_agency.hashCode());
        result = prime * result + proxy_creation_state;
        result = prime * result + qc_approval_media_state;
        result = prime * result + (int) (qc_approval_media_time ^ (qc_approval_media_time >>> 32));
        result = prime * result + (int) (qc_approval_media_user_id ^ (qc_approval_media_user_id >>> 32));
        result = prime * result + (int) (qc_proxy_approval_time ^ (qc_proxy_approval_time >>> 32));
        result = prime * result + quality_check_state;
        result = prime * result + (int) (region_id ^ (region_id >>> 32));
        result = prime * result + (request_upload ? 1231 : 1237);
        result = prime * result + (int) (slave_post_delivered_time ^ (slave_post_delivered_time >>> 32));
        result = prime * result + (int) (slave_pre_delivered_time ^ (slave_pre_delivered_time >>> 32));
        result = prime * result + (int) (slave_time_delivered ^ (slave_time_delivered >>> 32));
        result = prime * result + (int) (sponsorship_division_id ^ (sponsorship_division_id >>> 32));
        result = prime * result + (int) (sponsorship_locality_id ^ (sponsorship_locality_id >>> 32));
        result = prime * result + (stopped ? 1231 : 1237);
        result = prime * result + (int) (time_delivered ^ (time_delivered >>> 32));
        result = prime * result + ((title == null) ? 0 : title.hashCode());
        result = prime * result + (transcoding ? 1231 : 1237);
        result = prime * result + (int) (urr_time ^ (urr_time >>> 32));
        return result;
    }

    @Override
    @SuppressWarnings({"checkstyle:npathcomplexity", "checkstyle:cyclomaticcomplexity"})
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        ComplexDomainObject other = (ComplexDomainObject) obj;

        if (UUID != other.UUID) {
            return false;
        }

        if (aired != other.aired) {
            return false;
        }
        if (approval_advert_state != other.approval_advert_state) {
            return false;
        }
        if (approval_advert_time != other.approval_advert_time) {
            return false;
        }
        if (approval_advert_user_id != other.approval_advert_user_id) {
            return false;
        }
        if (b_p_code == null) {
            if (other.b_p_code != null) {
                return false;
            }
        } else if (!b_p_code.equals(other.b_p_code)) {
            return false;
        }
        if (brand_id != other.brand_id) {
            return false;
        }
        if (brand_name == null) {
            if (other.brand_name != null) {
                return false;
            }
        } else if (!brand_name.equals(other.brand_name)) {
            return false;
        }
        if (class_approval_media_state != other.class_approval_media_state) {
            return false;
        }
        if (class_approval_media_time != other.class_approval_media_time) {
            return false;
        }
        if (class_approval_media_user_id != other.class_approval_media_user_id) {
            return false;
        }
        if (clock_approval_media_state != other.clock_approval_media_state) {
            return false;
        }
        if (clock_approval_media_time != other.clock_approval_media_time) {
            return false;
        }
        if (clock_approval_media_user_id != other.clock_approval_media_user_id) {
            return false;
        }
        if (content_approval_media_state != other.content_approval_media_state) {
            return false;
        }
        if (content_approval_media_time != other.content_approval_media_time) {
            return false;
        }
        if (content_approval_media_user_id != other.content_approval_media_user_id) {
            return false;
        }
        if (content_type != other.content_type) {
            return false;
        }
        if (copy_code == null) {
            if (other.copy_code != null) {
                return false;
            }
        } else if (!copy_code.equals(other.copy_code)) {
            return false;
        }
        if (copy_code_id != other.copy_code_id) {
            return false;
        }
        if (copy_envelope_action_state != other.copy_envelope_action_state) {
            return false;
        }
        if (copy_envelope_id != other.copy_envelope_id) {
            return false;
        }
        if (copy_envelope_sender_id != other.copy_envelope_sender_id) {
            return false;
        }
        if (created_from_mismatch != other.created_from_mismatch) {
            return false;
        }
        if (creative_agency == null) {
            if (other.creative_agency != null) {
                return false;
            }
        } else if (!creative_agency.equals(other.creative_agency)) {
            return false;
        }
        if (delivered_from_elsewhere != other.delivered_from_elsewhere) {
            return false;
        }
        if (delivery_action_state != other.delivery_action_state) {
            return false;
        }
        if (delivery_deadline != other.delivery_deadline) {
            return false;
        }
        if (delivery_deadline_ms_algo != other.delivery_deadline_ms_algo) {
            return false;
        }
        if (delivery_id != other.delivery_id) {
            return false;
        }
        if (disabled_for_upload != other.disabled_for_upload) {
            return false;
        }
        if (division_id != other.division_id) {
            return false;
        }
        if (division_name == null) {
            if (other.division_name != null) {
                return false;
            }
        } else if (!division_name.equals(other.division_name)) {
            return false;
        }
        if (download_speed != other.download_speed) {
            return false;
        }
        if (expiration_time != other.expiration_time) {
            return false;
        }
        if (film_length != other.film_length) {
            return false;
        }
        if (first_air_date != other.first_air_date) {
            return false;
        }
        if (inactive != other.inactive) {
            return false;
        }
        if (invoice_account_demand != other.invoice_account_demand) {
            return false;
        }
        if (locality_id != other.locality_id) {
            return false;
        }
        if (locality_name == null) {
            if (other.locality_name != null) {
                return false;
            }
        } else if (!locality_name.equals(other.locality_name)) {
            return false;
        }
        if (media_agency_buying == null) {
            if (other.media_agency_buying != null) {
                return false;
            }
        } else if (!media_agency_buying.equals(other.media_agency_buying)) {
            return false;
        }
        if (media_agency_planning == null) {
            if (other.media_agency_planning != null) {
                return false;
            }
        } else if (!media_agency_planning
                .equals(other.media_agency_planning)) {
            return false;
        }
        if (media_class_approval_instruction != other.media_class_approval_instruction) {
            return false;
        }
        if (media_clock_approval_instruction != other.media_clock_approval_instruction) {
            return false;
        }
        if (media_content_approval_instruction != other.media_content_approval_instruction) {
            return false;
        }
        if (media_delivery_hours != other.media_delivery_hours) {
            return false;
        }
        if (media_destination_id != other.media_destination_id) {
            return false;
        }
        if (media_first_air_date != other.media_first_air_date) {
            return false;
        }
        if (media_house_nr == null) {
            if (other.media_house_nr != null) {
                return false;
            }
        } else if (!media_house_nr.equals(other.media_house_nr)) {
            return false;
        }
        if (media_house_nr_instruction != other.media_house_nr_instruction) {
            return false;
        }
        if (media_id != other.media_id) {
            return false;
        }
        if (media_instruction_approval_instruction != other.media_instruction_approval_instruction) {
            return false;
        }
        if (media_music_report_required != other.media_music_report_required) {
            return false;
        }
        if (media_name == null) {
            if (other.media_name != null) {
                return false;
            }
        } else if (!media_name.equals(other.media_name)) {
            return false;
        }
        if (media_qc_approval_instruction != other.media_qc_approval_instruction) {
            return false;
        }
        if (media_slave_destination_id != other.media_slave_destination_id) {
            return false;
        }
        if (media_type_media_extension_id != other.media_type_media_extension_id) {
            return false;
        }
        if (mismatch != other.mismatch) {
            return false;
        }
        if (mismatch_ignored != other.mismatch_ignored) {
            return false;
        }
        if (music_report_completed != other.music_report_completed) {
            return false;
        }
        if (music_report_completed_action != other.music_report_completed_action) {
            return false;
        }
        if (music_report_completed_time != other.music_report_completed_time) {
            return false;
        }
        if (music_report_request_count != other.music_report_request_count) {
            return false;
        }
        if (music_report_request_time != other.music_report_request_time) {
            return false;
        }
        if (music_to_report != other.music_to_report) {
            return false;
        }
        if (num_instruction_approval_not_performed != other.num_instruction_approval_not_performed) {
            return false;
        }
        if (num_instruction_approved != other.num_instruction_approved) {
            return false;
        }
        if (num_instruction_rejected != other.num_instruction_rejected) {
            return false;
        }
        if (other_agency == null) {
            if (other.other_agency != null) {
                return false;
            }
        } else if (!other_agency.equals(other.other_agency)) {
            return false;
        }
        if (post_delivered_time != other.post_delivered_time) {
            return false;
        }
        if (post_production_agency == null) {
            if (other.post_production_agency != null) {
                return false;
            }
        } else if (!post_production_agency
                .equals(other.post_production_agency)) {
            return false;
        }
        if (poster_id != other.poster_id) {
            return false;
        }
        if (pre_delivered_time != other.pre_delivered_time) {
            return false;
        }
        if (production_agency == null) {
            if (other.production_agency != null) {
                return false;
            }
        } else if (!production_agency.equals(other.production_agency)) {
            return false;
        }
        if (proxy_creation_state != other.proxy_creation_state) {
            return false;
        }
        if (qc_approval_media_state != other.qc_approval_media_state) {
            return false;
        }
        if (qc_approval_media_time != other.qc_approval_media_time) {
            return false;
        }
        if (qc_approval_media_user_id != other.qc_approval_media_user_id) {
            return false;
        }
        if (qc_proxy_approval_time != other.qc_proxy_approval_time) {
            return false;
        }
        if (quality_check_state != other.quality_check_state) {
            return false;
        }
        if (region_id != other.region_id) {
            return false;
        }
        if (request_upload != other.request_upload) {
            return false;
        }
        if (slave_post_delivered_time != other.slave_post_delivered_time) {
            return false;
        }
        if (slave_pre_delivered_time != other.slave_pre_delivered_time) {
            return false;
        }
        if (slave_time_delivered != other.slave_time_delivered) {
            return false;
        }
        if (sponsorship_division_id != other.sponsorship_division_id) {
            return false;
        }
        if (sponsorship_locality_id != other.sponsorship_locality_id) {
            return false;
        }
        if (stopped != other.stopped) {
            return false;
        }
        if (time_delivered != other.time_delivered) {
            return false;
        }
        if (title == null) {
            if (other.title != null) {
                return false;
            }
        } else if (!title.equals(other.title)) {
            return false;
        }
        if (transcoding != other.transcoding) {
            return false;
        }
        return urr_time == other.urr_time;
    }

    @Override
    public String toString() {
        return "ComplexDomainObject{"
                + "title=" + title
                + ", copy_code=" + copy_code
                + ", copy_code_id=" + copy_code_id
                + ", film_length=" + film_length
                + '}';
    }
}


text:
function daysInMonth(iMonth, iYear) {
  return new Date(iYear, iMonth,iMonth 0).getDate();
}

redpajama_set_name: RedPajamaGithub


text:
using System.Globalization;
using System.Windows.Data;
using Waf.MusicManager.Applications.DataModels;
using Waf.MusicManager.Presentation.Properties;

namespace Waf.MusicManager.Presentation.Converters;

public class FilterOperatorToStringConverter : IValueConverter
{
    public object? Convert(object? value, Type? targetType, object? parameter, CultureInfo? culture)
    {
        if (value == null) return null;
        var isDescription = ConverterHelper.IsParameterSet("description", parameter);
        var filterOperator = (FilterOperator)value;
        return filterOperator switch
        {
            FilterOperator.Ignore => isDescription ? Resources.IgnoreValue : "",
            FilterOperator.LessThanOrEqual => isDescription ? Resources.LessThanOrEqual : "<=",
            FilterOperator.GreaterThanOrEqual => isDescription ? Resources.GreaterThanOrEqual : ">=",
            _ => throw new InvalidOperationException("Enum value is unknown."),
        };
    }

    public object ConvertBack(object? value, Type? targetType, object? parameter, CultureInfo? culture) => throw new NotSupportedException();
}


text:
class Group(object):
    ''' a group of ansible hosts '''

    __slots__ = [ 'name', 'hosts', 'vars', 'child_groups', 'parent_groups', 'depth', '_hosts_cache' ]

    def __init__(self, name=None):

        self.depth = 0
        self.name = name
        self.hosts = []
        self.vars = {}
        self.child_groups = []
        self.parent_groups = []
        self._hosts_cache = None
        #self.clear_hosts_cache()
        if self.name is None:
            raise Exception("group name is required")

    def add_child_group(self, group):

        if self == group:
            raise Exception("can't add group to itself")

        # don't add if it's already there
        if not group in self.child_groups:
            self.child_groups.append(group)

            # update the depth of the child
            group.depth = max([self.depth+1, group.depth])

            # update the depth of the grandchildren
            group._check_children_depth()

            # now add self to child's parent_groups list, but only if there
            # isn't already a group with the same name
            if not self.name in [g.name for g in group.parent_groups]:
                group.parent_groups.append(self)

            self.clear_hosts_cache()

    def _check_children_depth(self):

        for group in self.child_groups:
            group.depth = max([self.depth+1, group.depth])
            group._check_children_depth()

    def add_host(self, host):

        self.hosts.append(host)
        host.add_group(self)
        self.clear_hosts_cache()

    def set_variable(self, key, value):

        self.vars[key] = value

    def clear_hosts_cache(self):

        self._hosts_cache = None
        for g in self.parent_groups:
            g.clear_hosts_cache()

    def get_hosts(self):

        if self._hosts_cache is None:
            self._hosts_cache = self._get_hosts()

        return self._hosts_cache

    def _get_hosts(self):

        hosts = []
        seen = {}
        for kid in self.child_groups:
            kid_hosts = kid.get_hosts()
            for kk in kid_hosts:
                if kk not in seen:
                    seen[kk] = 1
                    hosts.append(kk)
        for mine in self.hosts:
            if mine not in seen:
                seen[mine] = 1
                hosts.append(mine)
        return hosts

    def get_variables(self):
        return self.vars.copy()

    def _get_ancestors(self):

        results = {}
        for g in self.parent_groups:
            results[g.name] = g
            results.update(g._get_ancestors())
        return results

    def get_ancestors(self):

        return self._get_ancestors().values()


text:
# IvoPetkov\DataListSlicePropertiesAction

Information about a sliceProperties action applied on a data list.

```php
IvoPetkov\DataListSlicePropertiesAction extends IvoPetkov\DataListAction {

	/* Properties */
	public array $properties

}
```

## Extends

##### [IvoPetkov\DataListAction](ivopetkov.datalistaction.class.md)

      Information about an action applied on a data list.

## Properties

##### public array $properties

      The properties list.

### Inherited from [IvoPetkov\DataListAction](ivopetkov.datalistaction.class.md)

##### public string $name

      The name of the action.

## Methods

### Inherited from [IvoPetkov\DataListAction](ivopetkov.datalistaction.class.md)

##### public array [toArray](ivopetkov.datalistaction.toarray.method.md) ( [ array $options = [] ] )

      Returns the object data converted as an array.

##### public string [toJSON](ivopetkov.datalistaction.tojson.method.md) ( [ array $options = [] ] )

      Returns the object data converted as JSON.

## Details

Location: ~/src/DataListSlicePropertiesAction.php

---

[back to index](index.md)


text:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="TRACE">
  <Appenders>
    <RollingFile
      name="MAINFILE"
      fileName="log/dsworkbench.log"
      filePattern="log/dsworkbench.%i.log.gz"
      ignoreExceptions="false">
      <PatternLayout pattern="%d - %-5p [%t] - (%C [%L]) - %m%n"/>
      <Policies>
        <OnStartupTriggeringPolicy />
        <SizeBasedTriggeringPolicy size="50 MB" />
      </Policies>
      <DefaultRolloverStrategy>
        <Delete basePath="${baseDir}" maxDepth="1">
          <IfFileName glob="log/dsworkbench.*.log.gz" />
          <IfLastModified age="7d" />
        </Delete>
      </DefaultRolloverStrategy>
    </RollingFile>
    <Console name="STDOUT" target="SYSTEM_OUT">
      <PatternLayout pattern="%d - %-5p [%t] - (%C [%L]) - %m%n"/>
    </Console>
  </Appenders>
  <Loggers>
    <Root level="trace">
      <AppenderRef ref="STDOUT"/>
      <AppenderRef ref="MAINFILE"/>
    </Root>
  </Loggers>
</Configuration>


text:
package gov.nih.nci.cabig.caaers.service.synchronizer.report;

import gov.nih.nci.cabig.caaers.domain.BiologicalIntervention;
import gov.nih.nci.cabig.caaers.domain.ExpeditedAdverseEventReport;
import gov.nih.nci.cabig.caaers.domain.GeneticIntervention;

import java.util.List;

/**
 * @author Biju Joseph
 * @since 1.5
 */
public class BiologicalInterventionSynchronizer extends AbstractAEInterventionSynchronizer {
    @Override
    public List<BiologicalIntervention> existingInterventions(ExpeditedAdverseEventReport aeReport) {
        return aeReport.getBiologicalInterventions();
    }

    @Override
    public List<BiologicalIntervention> xmlInterventions(ExpeditedAdverseEventReport aeReport) {
        return aeReport.getBiologicalInterventions();
    }
}


text:
"""Support to interface with the Plex API."""
from __future__ import annotations

from collections.abc import Callable
from functools import wraps
import logging
from typing import Any, TypeVar

import plexapi.exceptions
import requests.exceptions
from typing_extensions import Concatenate, ParamSpec

from homeassistant.components.media_player import (
    DOMAIN as MP_DOMAIN,
    BrowseMedia,
    MediaPlayerEntity,
    MediaPlayerEntityFeature,
    MediaPlayerState,
    MediaType,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.helpers.dispatcher import (
    async_dispatcher_connect,
    async_dispatcher_send,
)
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.network import is_internal_request

from .const import (
    COMMON_PLAYERS,
    CONF_SERVER_IDENTIFIER,
    DISPATCHERS,
    DOMAIN,
    NAME_FORMAT,
    PLEX_NEW_MP_SIGNAL,
    PLEX_UPDATE_MEDIA_PLAYER_SESSION_SIGNAL,
    PLEX_UPDATE_MEDIA_PLAYER_SIGNAL,
    PLEX_UPDATE_SENSOR_SIGNAL,
    SERVERS,
    TRANSIENT_DEVICE_MODELS,
)
from .media_browser import browse_media
from .services import process_plex_payload

_PlexMediaPlayerT = TypeVar("_PlexMediaPlayerT", bound="PlexMediaPlayer")
_R = TypeVar("_R")
_P = ParamSpec("_P")

_LOGGER = logging.getLogger(__name__)

def needs_session(
    func: Callable[Concatenate[_PlexMediaPlayerT, _P], _R]
) -> Callable[Concatenate[_PlexMediaPlayerT, _P], _R | None]:
    """Ensure session is available for certain attributes."""

    @wraps(func)
    def get_session_attribute(
        self: _PlexMediaPlayerT, *args: _P.args, **kwargs: _P.kwargs
    ) -> _R | None:
        if self.session is None:
            return None
        return func(self, *args, **kwargs)

    return get_session_attribute

async def async_setup_entry(
    hass: HomeAssistant,
    config_entry: ConfigEntry,
    async_add_entities: AddEntitiesCallback,
) -> None:
    """Set up Plex media_player from a config entry."""
    server_id = config_entry.data[CONF_SERVER_IDENTIFIER]
    registry = er.async_get(hass)

    @callback
    def async_new_media_players(new_entities):
        _async_add_entities(hass, registry, async_add_entities, server_id, new_entities)

    unsub = async_dispatcher_connect(
        hass, PLEX_NEW_MP_SIGNAL.format(server_id), async_new_media_players
    )
    hass.data[DOMAIN][DISPATCHERS][server_id].append(unsub)
    _LOGGER.debug("New entity listener created")

@callback
def _async_add_entities(hass, registry, async_add_entities, server_id, new_entities):
    """Set up Plex media_player entities."""
    _LOGGER.debug("New entities: %s", new_entities)
    entities = []
    plexserver = hass.data[DOMAIN][SERVERS][server_id]
    for entity_params in new_entities:
        plex_mp = PlexMediaPlayer(plexserver, **entity_params)
        entities.append(plex_mp)

        # Migration to per-server unique_ids
        old_entity_id = registry.async_get_entity_id(
            MP_DOMAIN, DOMAIN, plex_mp.machine_identifier
        )
        if old_entity_id is not None:
            new_unique_id = f"{server_id}:{plex_mp.machine_identifier}"
            _LOGGER.debug(
                "Migrating unique_id from [%s] to [%s]",
                plex_mp.machine_identifier,
                new_unique_id,
            )
            registry.async_update_entity(old_entity_id, new_unique_id=new_unique_id)

    async_add_entities(entities, True)

class PlexMediaPlayer(MediaPlayerEntity):
    """Representation of a Plex device."""

    def __init__(self, plex_server, device, player_source, session=None):
        """Initialize the Plex device."""
        self.plex_server = plex_server
        self.device = device
        self.player_source = player_source

        self.device_make = None
        self.device_platform = None
        self.device_product = None
        self.device_title = None
        self.device_version = None
        self.machine_identifier = device.machineIdentifier
        self.session_device = None

        self._device_protocol_capabilities = None
        self._previous_volume_level = 1  # Used in fake muting
        self._volume_level = 1  # since we can't retrieve remotely
        self._volume_muted = False  # since we can't retrieve remotely

        self._attr_available = False
        self._attr_should_poll = False
        self._attr_state = MediaPlayerState.IDLE
        self._attr_unique_id = (
            f"{self.plex_server.machine_identifier}:{self.machine_identifier}"
        )

        # Initializes other attributes
        self.session = session

    async def async_added_to_hass(self) -> None:
        """Run when about to be added to hass."""
        _LOGGER.debug("Added %s [%s]", self.entity_id, self.unique_id)
        self.async_on_remove(
            async_dispatcher_connect(
                self.hass,
                PLEX_UPDATE_MEDIA_PLAYER_SIGNAL.format(self.unique_id),
                self.async_refresh_media_player,
            )
        )

        self.async_on_remove(
            async_dispatcher_connect(
                self.hass,
                PLEX_UPDATE_MEDIA_PLAYER_SESSION_SIGNAL.format(self.unique_id),
                self.async_update_from_websocket,
            )
        )

    @callback
    def async_refresh_media_player(self, device, session, source):
        """Set instance objects and trigger an entity state update."""
        _LOGGER.debug("Refreshing %s [%s / %s]", self.entity_id, device, session)
        self.device = device
        self.session = session
        if source:
            self.player_source = source
        self.async_schedule_update_ha_state(True)

        async_dispatcher_send(
            self.hass,
            PLEX_UPDATE_SENSOR_SIGNAL.format(self.plex_server.machine_identifier),
        )

    @callback
    def async_update_from_websocket(self, state):
        """Update the entity based on new websocket data."""
        self.update_state(state)
        self.async_write_ha_state()

        async_dispatcher_send(
            self.hass,
            PLEX_UPDATE_SENSOR_SIGNAL.format(self.plex_server.machine_identifier),
        )

    def update(self):
        """Refresh key device data."""
        if not self.session:
            self.force_idle()
            if not self.device:
                self._attr_available = False
                return

        self._attr_available = True

        try:
            device_url = self.device.url("/")
        except plexapi.exceptions.BadRequest:
            device_url = "127.0.0.1"
        if "127.0.0.1" in device_url:
            self.device.proxyThroughServer()
        self._device_protocol_capabilities = self.device.protocolCapabilities

        for device in filter(None, [self.device, self.session_device]):
            self.device_make = self.device_make or device.device
            self.device_platform = self.device_platform or device.platform
            self.device_product = self.device_product or device.product
            self.device_title = self.device_title or device.title
            self.device_version = self.device_version or device.version

        name_parts = [self.device_product, self.device_title or self.device_platform]
        if (self.device_product in COMMON_PLAYERS) and self.device_make:
            # Add more context in name for likely duplicates
            name_parts.append(self.device_make)
        if self.username and self.username != self.plex_server.owner:
            # Prepend username for shared/managed clients
            name_parts.insert(0, self.username)
        self._attr_name = NAME_FORMAT.format(" - ".join(name_parts))

    def force_idle(self):
        """Force client to idle."""
        self._attr_state = MediaPlayerState.IDLE
        if self.player_source == "session":
            self.device = None
            self.session_device = None
            self._attr_available = False

    @property
    def session(self):
        """Return the active session for this player."""
        return self._session

    @session.setter
    def session(self, session):
        self._session = session
        if session:
            self.session_device = self.session.player
            self.update_state(self.session.state)
        else:
            self._attr_state = MediaPlayerState.IDLE

    @property
    @needs_session
    def username(self):
        """Return the username of the client owner."""
        return self.session.username

    def update_state(self, state):
        """Set the state of the device, handle session termination."""
        if state == "playing":
            self._attr_state = MediaPlayerState.PLAYING
        elif state == "paused":
            self._attr_state = MediaPlayerState.PAUSED
        elif state == "stopped":
            self.session = None
            self.force_idle()
        else:
            self._attr_state = MediaPlayerState.IDLE

    @property
    def _is_player_active(self):
        """Report if the client is playing media."""
        return self.state in {MediaPlayerState.PLAYING, MediaPlayerState.PAUSED}

    @property
    def _active_media_plexapi_type(self):
        """Get the active media type required by PlexAPI commands."""
        if self.media_content_type == MediaType.MUSIC:
            return "music"

        return "video"

    @property
    @needs_session
    def session_key(self):
        """Return current session key."""
        return self.session.sessionKey

    @property
    @needs_session
    def media_library_title(self):
        """Return the library name of playing media."""
        return self.session.media_library_title

    @property
    @needs_session
    def media_content_id(self):
        """Return the content ID of current playing media."""
        return self.session.media_content_id

    @property
    @needs_session
    def media_content_type(self):
        """Return the content type of current playing media."""
        return self.session.media_content_type

    @property
    @needs_session
    def media_content_rating(self):
        """Return the content rating of current playing media."""
        return self.session.media_content_rating

    @property
    @needs_session
    def media_artist(self):
        """Return the artist of current playing media, music track only."""
        return self.session.media_artist

    @property
    @needs_session
    def media_album_name(self):
        """Return the album name of current playing media, music track only."""
        return self.session.media_album_name

    @property
    @needs_session
    def media_album_artist(self):
        """Return the album artist of current playing media, music only."""
        return self.session.media_album_artist

    @property
    @needs_session
    def media_track(self):
        """Return the track number of current playing media, music only."""
        return self.session.media_track

    @property
    @needs_session
    def media_duration(self):
        """Return the duration of current playing media in seconds."""
        return self.session.media_duration

    @property
    @needs_session
    def media_position(self):
        """Return the duration of current playing media in seconds."""
        return self.session.media_position

    @property
    @needs_session
    def media_position_updated_at(self):
        """When was the position of the current playing media valid."""
        return self.session.media_position_updated_at

    @property
    @needs_session
    def media_image_url(self):
        """Return the image URL of current playing media."""
        return self.session.media_image_url

    @property
    @needs_session
    def media_summary(self):
        """Return the summary of current playing media."""
        return self.session.media_summary

    @property
    @needs_session
    def media_title(self):
        """Return the title of current playing media."""
        return self.session.media_title

    @property
    @needs_session
    def media_season(self):
        """Return the season of current playing media (TV Show only)."""
        return self.session.media_season

    @property
    @needs_session
    def media_series_title(self):
        """Return the title of the series of current playing media."""
        return self.session.media_series_title

    @property
    @needs_session
    def media_episode(self):
        """Return the episode of current playing media (TV Show only)."""
        return self.session.media_episode

    @property
    def supported_features(self):
        """Flag media player features that are supported."""
        if self.device and "playback" in self._device_protocol_capabilities:
            return (
                MediaPlayerEntityFeature.PAUSE
                | MediaPlayerEntityFeature.PREVIOUS_TRACK
                | MediaPlayerEntityFeature.NEXT_TRACK
                | MediaPlayerEntityFeature.STOP
                | MediaPlayerEntityFeature.SEEK
                | MediaPlayerEntityFeature.VOLUME_SET
                | MediaPlayerEntityFeature.PLAY
                | MediaPlayerEntityFeature.PLAY_MEDIA
                | MediaPlayerEntityFeature.VOLUME_MUTE
                | MediaPlayerEntityFeature.BROWSE_MEDIA
            )

        return (
            MediaPlayerEntityFeature.BROWSE_MEDIA | MediaPlayerEntityFeature.PLAY_MEDIA
        )

    def set_volume_level(self, volume: float) -> None:
        """Set volume level, range 0..1."""
        if self.device and "playback" in self._device_protocol_capabilities:
            self.device.setVolume(int(volume * 100), self._active_media_plexapi_type)
            self._volume_level = volume  # store since we can't retrieve

    @property
    def volume_level(self):
        """Return the volume level of the client (0..1)."""
        if (
            self._is_player_active
            and self.device
            and "playback" in self._device_protocol_capabilities
        ):
            return self._volume_level
        return None

    @property
    def is_volume_muted(self):
        """Return boolean if volume is currently muted."""
        if self._is_player_active and self.device:
            return self._volume_muted
        return None

    def mute_volume(self, mute: bool) -> None:
        """Mute the volume.

        Since we can't actually mute, we'll:
        - On mute, store volume and set volume to 0
        - On unmute, set volume to previously stored volume
        """
        if not (self.device and "playback" in self._device_protocol_capabilities):
            return

        self._volume_muted = mute
        if mute:
            self._previous_volume_level = self._volume_level
            self.set_volume_level(0)
        else:
            self.set_volume_level(self._previous_volume_level)

    def media_play(self) -> None:
        """Send play command."""
        if self.device and "playback" in self._device_protocol_capabilities:
            self.device.play(self._active_media_plexapi_type)

    def media_pause(self) -> None:
        """Send pause command."""
        if self.device and "playback" in self._device_protocol_capabilities:
            self.device.pause(self._active_media_plexapi_type)

    def media_stop(self) -> None:
        """Send stop command."""
        if self.device and "playback" in self._device_protocol_capabilities:
            self.device.stop(self._active_media_plexapi_type)

    def media_seek(self, position: float) -> None:
        """Send the seek command."""
        if self.device and "playback" in self._device_protocol_capabilities:
            self.device.seekTo(position * 1000, self._active_media_plexapi_type)

    def media_next_track(self) -> None:
        """Send next track command."""
        if self.device and "playback" in self._device_protocol_capabilities:
            self.device.skipNext(self._active_media_plexapi_type)

    def media_previous_track(self) -> None:
        """Send previous track command."""
        if self.device and "playback" in self._device_protocol_capabilities:
            self.device.skipPrevious(self._active_media_plexapi_type)

    def play_media(self, media_type: str, media_id: str, **kwargs: Any) -> None:
        """Play a piece of media."""
        if not (self.device and "playback" in self._device_protocol_capabilities):
            raise HomeAssistantError(
                f"Client is not currently accepting playback controls: {self.name}"
            )

        result = process_plex_payload(
            self.hass, media_type, media_id, default_plex_server=self.plex_server
        )
        _LOGGER.debug("Attempting to play %s on %s", result.media, self.name)

        try:
            self.device.playMedia(result.media, offset=result.offset)
        except requests.exceptions.ConnectTimeout as exc:
            raise HomeAssistantError(
                f"Request failed when playing on {self.name}"
            ) from exc

    @property
    def extra_state_attributes(self):
        """Return the scene state attributes."""
        attributes = {}
        for attr in (
            "media_content_rating",
            "media_library_title",
            "player_source",
            "media_summary",
            "username",
        ):
            if value := getattr(self, attr, None):
                attributes[attr] = value

        return attributes

    @property
    def device_info(self) -> DeviceInfo | None:
        """Return a device description for device registry."""
        if self.machine_identifier is None:
            return None

        if self.device_product in TRANSIENT_DEVICE_MODELS:
            return DeviceInfo(
                identifiers={(DOMAIN, "plex.tv-clients")},
                name="Plex Client Service",
                manufacturer="Plex",
                model="Plex Clients",
                entry_type=DeviceEntryType.SERVICE,
            )

        return DeviceInfo(
            identifiers={(DOMAIN, self.machine_identifier)},
            manufacturer=self.device_platform or "Plex",
            model=self.device_product or self.device_make,
            name=self.name,
            sw_version=self.device_version,
            via_device=(DOMAIN, self.plex_server.machine_identifier),
        )

    async def async_browse_media(
        self, media_content_type: str | None = None, media_content_id: str | None = None
    ) -> BrowseMedia:
        """Implement the websocket media browsing helper."""
        is_internal = is_internal_request(self.hass)
        return await self.hass.async_add_executor_job(
            browse_media,
            self.hass,
            is_internal,
            media_content_type,
            media_content_id,
        )


text:
set session role=usertest70;
drop table a;


text:
package org.slieb.throwables;

import java.lang.FunctionalInterface;
import java.lang.SuppressWarnings;
import java.lang.Throwable;
import java.util.function.Consumer;
import java.util.function.IntPredicate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
 * Generated from IntPredicate
 * Extends java.util.function.IntPredicate to allow for a checked exception.
 *
 * @param <E> The extension
 */
@FunctionalInterface
@SuppressWarnings({"WeakerAccess"})
public interface IntPredicateWithThrowable<E extends Throwable> extends IntPredicate {

    /**
     * Utility method to mark lambdas of type IntPredicateWithThrowable
     *
     * @param intpredicatewiththrowable The interface instance
     * @param <E> The type this interface is allowed to throw
     * @return the cast interface
     */
    static <E extends Throwable> IntPredicateWithThrowable<E> castIntPredicateWithThrowable(final IntPredicateWithThrowable<E> intpredicatewiththrowable) {
        return intpredicatewiththrowable;
    }

    /**
     * Utility method to unwrap lambdas of type IntPredicate and withUncheckedThrowable any Exception
     *
     * @param intpredicatewiththrowable The interface instance
     * @param <E> The type this interface is allowed to throw
     * @throws E the original Exception from intpredicatewiththrowable
     * @return the cast interface
     */
    static <E extends Throwable> IntPredicate aIntPredicateThatUnsafelyThrowsUnchecked(final IntPredicateWithThrowable<E> intpredicatewiththrowable) throws E {
        return intpredicatewiththrowable.thatUnsafelyThrowsUnchecked();
    }

    /**
     * Utility method to convert IntPredicateWithThrowable
     * @param intpredicate The interface instance
     * @param <E> The type this interface is allowed to throw
     * @return the cast interface
     */
    static <E extends Throwable> IntPredicateWithThrowable<E> asIntPredicateWithThrowable(final IntPredicate intpredicate) {
        return intpredicate::test;
    }

    /**
     * Overridden method of IntPredicateWithThrowable that will call testWithThrowable, but catching any exceptions.
     *
     * @param v1 parameter to overridden method
     * @return the value
     */
    @Override
    default boolean test(final int v1) {
        try {
            return testWithThrowable(v1);
        } catch (final RuntimeException | Error exception) {
            throw exception;
        } catch (final Throwable throwable) {
            throw new SuppressedException(throwable);
        }
    }

    /**
     * Functional method that will throw exceptions.
     *
     * @param v1 parameter to overridden method
     * @return the value
     * @throws E some exception
     */
    boolean testWithThrowable(final int v1) throws E;

    /**
     * @param defaultReturnValue A value to return if any throwable is caught.
     * @return An interface that returns a default value if any exception occurs.
     */
    default IntPredicate thatReturnsOnCatch(final boolean defaultReturnValue) {
      return (final int v1) -> {
        try {
          return testWithThrowable(v1);
        } catch(final Throwable throwable) {
          return defaultReturnValue;
        }
      };
    }

    /**
     * @throws E if an exception E has been thrown, it is rethrown by this method
     * @return An interface that is only returned if no exception has been thrown.
     */
    default IntPredicate thatUnsafelyThrowsUnchecked() throws E {
      return (final int v1) -> {
        try {
          return testWithThrowable(v1);
        } catch(final Throwable throwable) {
           SuppressedException.throwUnsafelyAsUnchecked(throwable);
           return false;        }
      };
    }

    /**
     * @param logger The logger to log exceptions on
     * @param message A message to use for logging exceptions
     * @return An interface that will log all exceptions to given logger
     */
    @SuppressWarnings("Duplicates")
    default IntPredicateWithThrowable<E> withLogging(final Logger logger, final String message) {
        return (final int v1) -> {
            try {
                return testWithThrowable(v1);
            } catch (final Throwable throwable) {
                logger.error(message, v1, throwable);
                throw throwable;
            }
        };
    }

    /**
     * Will log WARNING level exceptions on logger if they occur within the interface
     * @param logger The logger instance to log exceptions on
     * @return An interface that will log exceptions on given logger
     */
    default IntPredicateWithThrowable<E> withLogging(final Logger logger) {
        return withLogging(logger, "Exception in IntPredicateWithThrowable with the argument [{}]");
    }

    /**
     * Will log WARNING level exceptions on logger if they occur within the interface
     * @return An interface that will log exceptions on global logger
     */
    default IntPredicateWithThrowable<E> withLogging() {
        return withLogging(LoggerFactory.getLogger(getClass()));
    }

    /**
     * @param consumer An exception consumer.
     * @return An interface that will log all exceptions to given logger
     */
    @SuppressWarnings("Duplicates")
    default IntPredicateWithThrowable<E> onException(final Consumer<Throwable> consumer) {
        return (final int v1) -> {
            try {
                return testWithThrowable(v1);
            } catch (final Throwable throwable) {
                consumer.accept(throwable);
                throw throwable;
            }
        };
    }

    /**
     * @param consumer An exception consumer.
     * @return An interface that will log all exceptions to given logger
     */
    @SuppressWarnings("Duplicates")
    default IntPredicateWithThrowable<E> onException(final java.util.function.BiConsumer<Throwable, Object[]> consumer) {
        return (final int v1) -> {
            try {
                return testWithThrowable(v1);
            } catch (final Throwable throwable) {
                consumer.accept(throwable, new Object[]{v1});
                throw throwable;
            }
        };
    }
}


text:
<!DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Odstranitev povezave med napravami Bluetooth</title>
<link rel="stylesheet" type="text/css" href="../vodnik_1404.css">
<link rel="stylesheet" type="text/css" >

Ubuntu Slovenija | Uradna spletna stran slovenske skupnosti Linux distribucije Ubuntu

Novice

Forum

Kaj je Ubuntu?

Pogosta vprašanja

Skupnost

Povezave

					</script>

  Namizni vodnik Ubuntu » Strojna oprema » Bluetooth »

Odstranitev povezave med napravami Bluetooth

V primeru da z napravo Bluetooth ne želite biti več povezani, odstranite povezavo:

Kliknite na Meni Bluetooth v vrhnjem pultu in izberite Možnosti.

Izberite napravo, ki jo želite odklopiti.

Kliknite na gumb Odstrani.

Napravo Bluetooth lahko kasneje ponovno povežete, če želite.

Več podrobnosti

Bluetooth — Povezovanje, pošiljanje datotek, vklop in izklop ...

Material v tem dokumentu je na voljo pod prosto licenco. To je prevod dokumentacije Ubuntu, ki jo je sestavila Ubuntu dokumentacijska ekpa za Ubuntu. V slovenščino jo je prevedla skupina Ubuntu prevajalcev. Za poročanje napak v prevodih v tej dokumentaciji ali Ubuntuju pošljite sporočilo na dopisni seznam.


text:
package org.apache.river.test.spec.jeri.basicjeriexporter;

import java.util.logging.Level;

//test harness related imports
import org.apache.river.qa.harness.TestException;

//utility classes
import org.apache.river.test.spec.jeri.basicjeriexporter.util.BJEAbstractTest;
import org.apache.river.test.spec.jeri.basicjeriexporter.util.BJETestILFactory;

//overture imports
import net.jini.jeri.BasicJeriExporter;
import net.jini.jeri.tcp.TcpServerEndpoint;

//java.rmi.server
import java.rmi.server.ExportException;

/**
 * Purpose: This test verifies that the export method throws
 * the appropriate exceptions
 * Use Case: Attempting to pass a null argument to the export method.
 *

 * For Testing the Use Case:
 *

 *
Create a BasicJeriExporter instance.

 *
Call the export method on the exporter created in step 1,
 *     passing null as argument to the method call.

 *
Verify that a java.lang.NullPointerException
 *     is thrown.

 *

 */
public class ExportExceptionTest_NullArgument extends BJEAbstractTest{

    /**
     * For Testing the Use Case:
     *

     *
Create a BasicJeriExporter instance.

     *
Call the export method on the exporter created
     *     in step 1, passing null as argument to the method call.

     *
Verify that a java.lang.NullPointerException
     *     is thrown.

     *

     */
    public void run() throws Exception {
        //Create an exporter instance
        int listenPort = config.getIntConfigVal("org.apache.river.test.spec.jeri"
            + ".basicjeriexporter.listenPort", 9090);
        BasicJeriExporter exporter = new BasicJeriExporter(
            TcpServerEndpoint.getInstance(listenPort), new BJETestILFactory());
        try {
            //Call the export method passing null as the argument
            exporter.export(null);
            throw new TestException( "Passing null as argument"
                + " to the export method did not result in an exception being"
                + " thrown");
        } catch (ExportException e) {
            log.finer("Unexpected exception in call to export " +
                e.getMessage());
            throw new TestException( "An export exception"
                + " was thrown when a NullPointerException was expected", e);
        } catch (NullPointerException e) {
            //OK
        } catch (Exception e) {
            log.finer("Unexpected exception in call to export " +
                e.getMessage());
            throw new TestException("An unexpected exception"
                + " was thrown when a NullPointerException was expected", e);
        }
    }

}


text:
// Type: Highsoft.Web.Mvc.Stocks.AreasplinerangeSeriesDataLabelsOverflow

namespace Highsoft.Web.Mvc.Stocks
{
    public enum AreasplinerangeSeriesDataLabelsOverflow
    {
        Justify,
        None,
    }
}