{"id":2391,"date":"2025-12-23T10:00:03","date_gmt":"2025-12-23T15:00:03","guid":{"rendered":"http:\/\/www.mymiller.name\/wordpress\/?p=2391"},"modified":"2025-12-23T10:00:03","modified_gmt":"2025-12-23T15:00:03","slug":"java-development-tips","status":"publish","type":"post","link":"https:\/\/www.mymiller.name\/wordpress\/java_tips\/java-development-tips\/","title":{"rendered":"Java Development Tips"},"content":{"rendered":"\n<p>Java-based servers or applications often have to deal with large amounts of data.&nbsp; Whether the data is from a database, or from a local file, processing this data in an efficient manner is a priority for maintainability. In this article<g class=\"gr_ gr_258 gr-alert sel gr_gramm gr_replaced gr_inline_cards gr_disable_anim_appear Punctuation only-ins replaceWithoutSep\" id=\"258\" data-gr-id=\"258\">,<\/g> we will discuss the types of Java Data Objects and additional steps that should be applied to each.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Model<\/strong> &#8211; A Java object that represents a row from a database.&nbsp; A model is a specific data structure that must correspond to the format of the columns from a table.&nbsp;<\/li><li><strong>Data Transfer Object (DTO)<\/strong> &#8211; A Java object that contains data fields that may come from one or more models.&nbsp; Used to limit the data instead of including unnecessary fields.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Methods to Override<\/h2>\n\n\n\n<p>Java objects contain some basic methods, these methods need to be overridden or implemented.&nbsp; Data Models or DTO&#8217;s will easier to use and work with when these are in place.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Object::equals() override to provide a method for checking for equivalency between two objects.&nbsp; This method is used by many different actions throughout the JDK that enable much functionality.&nbsp;&nbsp;<\/li><li>Object::toString() override to provide a readable string representation of the Object.&nbsp; Java IDE&#8217;s make great use of this for the debuggers.&nbsp; This will assist logging practices, enabling logging of an entire Model\/DTO. This should be implemented in consideration of your environment.&nbsp; If you are using Hibernate, then pulling every field can be a costly in terms of the number of database queries.<br><\/li><li>Object::hashCode() override to generate a unique hashcode that is unique to each Model\/DTO instances. HashMaps, HashMaps, and Hash anything this will be used.&nbsp;&nbsp;<\/li><li>Cloneable::clone() &#8211; needs to provide a shallow clone of the object.&nbsp; Must add implement Cloneable interface.&nbsp; Not always a necessity, but extremely useful when needed.&nbsp;<br><\/li><li>Comparable::compareTo() &#8211; method to compare to objects.&nbsp; Must implement Comparable interface.&nbsp; Will make Collections::sort() and Streams.sorted().<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">hashcode() does not include ID<\/h2>\n\n\n\n<p>The hashcode() method should not include the ID on Models, when calculating the hashcode.&nbsp; The ID field corresponds to a row in the database, it is not part of the information that your evaluating.&nbsp; It can also change, without effecting the remaining data.&nbsp; So when implementing your hashcode() method leave the ID out.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Implementing equals()<\/h2>\n\n\n\n<p>When impelementing equals() on Model&#8217;s your going to have to make a project decision.&nbsp; There are three ways you can implement equals on models.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>equals() only compares the ID fields, to determine if the two objects represent the same row.&nbsp; This is fast, and when using third party libraries such as <a href=\"http:\/\/hibernate.org\/\">Hibernate<\/a> can significantly reduce database lookups. The downside is you don&#8217;t know if the data has changed between two instances.<\/li><li>equals() only compares the non-ID fields.&nbsp; This is doing a comparison of the actual data.&nbsp; Not the ID that would indicate where the model is in the database.&nbsp; This is helpful as it will tell you if you have two models that are identical.&nbsp; The downside is if you are using something like <a href=\"http:\/\/hibernate.org\/\">Hibernate<\/a> then it can result in multiple lookups.<\/li><li>equals()&nbsp;compares everything.&nbsp; It does a compare on the ID and all other fields in the Model.&nbsp; This tells you if you have the same Model, and if they have any differences.&nbsp; Again this has it&#8217;s place.<\/li><\/ol>\n\n\n\n<p>In general you should decide on a single standard way for a project.&nbsp; However you should not be afraid to use one of the other methods if it is necessary.&nbsp; Often you have those few objects that are just different and required different handling than everything else.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Implementing compareTo()<\/h2>\n\n\n\n<p>The compareTo() method is a funny beast.&nbsp; In the examples I provide below it&#8217;s easy to implement as it sorts by last name, first name, and then age.&nbsp; Not all Model\/DTO&#8217;s are so easily sorted.&nbsp; Often times you may find you need multiple different comparisons.<\/p>\n\n\n\n<p>The compareTo() should be the default method that sorts the data object into the order you would normally want them. This could be based on a single field, or multiple fields, your data will dictate this to you.<\/p>\n\n\n\n<p>However if you need to be able to compare by age only?&nbsp; Well just implement your own compareToAge() method.&nbsp; It&#8217;s not an override, but having this convenience function around will make your development much easier. Personally when creating a special compareTo() method that will compare only select fields, I like to add the field names to the method name, thus compareToAge().<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Constructors<\/h2>\n\n\n\n<p>Debate rages on between use of&nbsp; constructors or factories.&nbsp; I find each have their use.&nbsp; However my preference is to use constructors for converting between Objects.&nbsp;&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Default Constructor &#8211; Every object should have a default constructor.&nbsp; Zero parameters, for instantiations of those objects.&nbsp;&nbsp;<\/li><li>Copy Constructor &#8211; Given an object of the same type it should create a copy a Model \/ DTO with the exception of an ID<\/li><li>translation constructors &#8211; If the Model \/ DTO is used to translate from one or more Model \/ DTO&#8217;s to this Model \/ DTO it should have a constructor for creating the new object<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Clone v&#8217;s Copy Constructor<\/h2>\n\n\n\n<p>You may ask why should you have both a clone() and a copy constructor.&nbsp; For Models there is a big difference the clone() method should generate an exact copy of the object, including an ID.&nbsp; For DTO&#8217;s there is not ID, <g class=\"gr_ gr_6 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep\" id=\"6\" data-gr-id=\"6\">however<\/g> for <g class=\"gr_ gr_7 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep\" id=\"7\" data-gr-id=\"7\">consistency<\/g> it is wise to generate both.&nbsp; For Models the copy constructor should generate a new object with the exact same data, <g class=\"gr_ gr_209 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep\" id=\"209\" data-gr-id=\"209\">however<\/g> it should not contain the ID if it is a model.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Person Model Example<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\npublic class PersonModel implements Comparable&lt;PersonModel&gt;, Cloneable {\n\n\tprivate Long\tid;\n\tprivate String\tfirstName;\n\tprivate String\tlastName;\n\tprivate Integer\tage;\n\n\tpublic PersonModel() {\n\t\tsuper();\n\t}\n\n\tpublic PersonModel(PersonDTO copy) {\n\t\tthis(copy.getFirstName(), copy.getLastName(), copy.getAge());\n\t}\n\n\tpublic PersonModel(PersonModel copy) {\n\t\tthis(copy.getFirstName(), copy.getLastName(), copy.getAge());\n\t}\n\n\tpublic PersonModel(String firstName, String lastName, Integer age) {\n\t\tsuper();\n\t\tthis.firstName = firstName;\n\t\tthis.lastName = lastName;\n\t\tthis.age = age;\n\t}\n\n\t@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\tPersonModel clone = new PersonModel(this.getFirstName(), this.getLastName(), this.getAge());\n\t\tclone.setId(this.getId());\n\n\t\treturn clone;\n\t}\n\n\t@Override\n\tpublic int compareTo(PersonModel o) {\n\n\t\tint lastNameCompare = this.getLastName().compareTo(o.getLastName());\n\n\t\tif (lastNameCompare == 0) {\n\t\t\tint firstNameCompare = this.getFirstName().compareTo(o.getFirstName());\n\n\t\t\tif (firstNameCompare == 0) {\n\t\t\t\treturn this.getAge().compareTo(o.getAge());\n\t\t\t}\n\n\t\t\treturn firstNameCompare;\n\t\t}\n\n\t\treturn lastNameCompare;\n\t}\n\n\t\/*\n\t * (non-Javadoc)\n\t *\n\t * @see java.lang.Object#equals(java.lang.Object)\n\t *\/\n\t@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj) {\n\t\t\treturn true;\n\t\t}\n\t\tif (obj == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (this.getClass() != obj.getClass()) {\n\t\t\treturn false;\n\t\t}\n\t\tPersonModel other = (PersonModel) obj;\n\t\tif (this.age == null) {\n\t\t\tif (other.age != null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (!this.age.equals(other.age)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (this.firstName == null) {\n\t\t\tif (other.firstName != null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (!this.firstName.equals(other.firstName)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (this.lastName == null) {\n\t\t\tif (other.lastName != null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (!this.lastName.equals(other.lastName)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t\/**\n\t * @return the age\n\t *\/\n\tpublic Integer getAge() {\n\t\treturn this.age;\n\t}\n\n\t\/**\n\t * @return the firstName\n\t *\/\n\tpublic String getFirstName() {\n\t\treturn this.firstName;\n\t}\n\n\t\/**\n\t * @return the id\n\t *\/\n\tpublic Long getId() {\n\t\treturn this.id;\n\t}\n\n\t\/**\n\t * @return the lastName\n\t *\/\n\tpublic String getLastName() {\n\t\treturn this.lastName;\n\t}\n\n\t\/*\n\t * (non-Javadoc)\n\t *\n\t * @see java.lang.Object#hashCode()\n\t *\/\n\t@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = (prime * result) + ((this.age == null) ? 0 : this.age.hashCode());\n\t\tresult = (prime * result) + ((this.firstName == null) ? 0 : this.firstName.hashCode());\n\t\tresult = (prime * result) + ((this.lastName == null) ? 0 : this.lastName.hashCode());\n\t\treturn result;\n\t}\n\n\t\/**\n\t * @param age\n\t *            the age to set\n\t *\/\n\tpublic void setAge(Integer age) {\n\t\tthis.age = age;\n\t}\n\n\t\/**\n\t * @param firstName\n\t *            the firstName to set\n\t *\/\n\tpublic void setFirstName(String firstName) {\n\t\tthis.firstName = firstName;\n\t}\n\n\t\/**\n\t * @param id\n\t *            the id to set\n\t *\/\n\tpublic void setId(Long id) {\n\t\tthis.id = id;\n\t}\n\n\t\/**\n\t * @param lastName\n\t *            the lastName to set\n\t *\/\n\tpublic void setLastName(String lastName) {\n\t\tthis.lastName = lastName;\n\t}\n\n\t\/*\n\t * (non-Javadoc)\n\t *\n\t * @see java.lang.Object#toString()\n\t *\/\n\t@Override\n\tpublic String toString() {\n\t\treturn this.firstName + \" \" + this.lastName + \" age \" + this.age;\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Person DTO Example<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\npublic class PersonDTO implements Comparable&lt;PersonDTO&gt;, Cloneable {\n\n\tprivate String\tfirstName;\n\tprivate String\tlastName;\n\tprivate Integer\tage;\n\n\tpublic PersonDTO() {\n\t\tsuper();\n\t}\n\n\tpublic PersonDTO(PersonDTO copy) {\n\t\tthis(copy.getFirstName(), copy.getLastName(), copy.getAge());\n\t}\n\n\tpublic PersonDTO(PersonModel copy) {\n\t\tthis(copy.getFirstName(), copy.getLastName(), copy.getAge());\n\t}\n\n\tpublic PersonDTO(String firstName, String lastName, Integer age) {\n\t\tsuper();\n\t\tthis.firstName = firstName;\n\t\tthis.lastName = lastName;\n\t\tthis.age = age;\n\t}\n\n\t@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\tPersonDTO clone = new PersonDTO(this);\n\n\t\treturn clone;\n\t}\n\n\t@Override\n\tpublic int compareTo(PersonDTO o) {\n\n\t\tint lastNameCompare = this.getLastName().compareTo(o.getLastName());\n\n\t\tif (lastNameCompare == 0) {\n\t\t\tint firstNameCompare = this.getFirstName().compareTo(o.getFirstName());\n\n\t\t\tif (firstNameCompare == 0) {\n\t\t\t\treturn this.getAge().compareTo(o.getAge());\n\t\t\t}\n\n\t\t\treturn firstNameCompare;\n\t\t}\n\n\t\treturn lastNameCompare;\n\t}\n\t\n\tpublic int compareToAge(PersonDTO o) {\n\t\treturn this.getAge().compareTo(o.getAge());\n\t}\n\n\t\/*\n\t * (non-Javadoc)\n\t *\n\t * @see java.lang.Object#equals(java.lang.Object)\n\t *\/\n\t@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj) {\n\t\t\treturn true;\n\t\t}\n\t\tif (obj == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (this.getClass() != obj.getClass()) {\n\t\t\treturn false;\n\t\t}\n\t\tPersonDTO other = (PersonDTO) obj;\n\t\tif (this.age == null) {\n\t\t\tif (other.age != null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (!this.age.equals(other.age)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (this.firstName == null) {\n\t\t\tif (other.firstName != null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (!this.firstName.equals(other.firstName)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (this.lastName == null) {\n\t\t\tif (other.lastName != null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (!this.lastName.equals(other.lastName)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t\/**\n\t * @return the age\n\t *\/\n\tpublic Integer getAge() {\n\t\treturn this.age;\n\t}\n\n\t\/**\n\t * @return the firstName\n\t *\/\n\tpublic String getFirstName() {\n\t\treturn this.firstName;\n\t}\n\n\t\/**\n\t * @return the lastName\n\t *\/\n\tpublic String getLastName() {\n\t\treturn this.lastName;\n\t}\n\n\t\/*\n\t * (non-Javadoc)\n\t *\n\t * @see java.lang.Object#hashCode()\n\t *\/\n\t@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = (prime * result) + ((this.age == null) ? 0 : this.age.hashCode());\n\t\tresult = (prime * result) + ((this.firstName == null) ? 0 : this.firstName.hashCode());\n\t\tresult = (prime * result) + ((this.lastName == null) ? 0 : this.lastName.hashCode());\n\t\treturn result;\n\t}\n\n\t\/**\n\t * @param age\n\t *            the age to set\n\t *\/\n\tpublic void setAge(Integer age) {\n\t\tthis.age = age;\n\t}\n\n\t\/**\n\t * @param firstName\n\t *            the firstName to set\n\t *\/\n\tpublic void setFirstName(String firstName) {\n\t\tthis.firstName = firstName;\n\t}\n\n\t\/**\n\t * @param lastName\n\t *            the lastName to set\n\t *\/\n\tpublic void setLastName(String lastName) {\n\t\tthis.lastName = lastName;\n\t}\n\n\t\/*\n\t * (non-Javadoc)\n\t *\n\t * @see java.lang.Object#toString()\n\t *\/\n\t@Override\n\tpublic String toString() {\n\t\treturn this.firstName + \" \" + this.lastName + \" age \" + this.age;\n\t}\n}\n<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java-based servers or applications often have to deal with large amounts of data.&nbsp; Whether the data is from a database, or from a local file, processing this data in an efficient manner is a priority for maintainability. In this article, we will discuss the types of Java Data Objects and additional steps that should be [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2429,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[452],"tags":[69],"series":[360],"class_list":["post-2391","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java_tips","tag-java-2","series-java-tips"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2018\/10\/archive-1850170_640.jpg?fit=640%2C426&ssl=1","jetpack-related-posts":[{"id":3374,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_databases\/spring-data-with-java-records\/","url_meta":{"origin":2391,"position":0},"title":"Spring Data with Java Records","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"Java records are a new feature introduced in Java 14 that provides a concise way to declare classes that are meant to hold immutable data. Spring Data is a popular framework for building data access layers in Java applications. In this answer, we will explain how to use Java records\u2026","rel":"","context":"In &quot;Spring Databases&quot;","block_context":{"text":"Spring Databases","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_databases\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2023\/06\/office-work-gc63fa3774_640.jpg?fit=640%2C430&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2023\/06\/office-work-gc63fa3774_640.jpg?fit=640%2C430&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2023\/06\/office-work-gc63fa3774_640.jpg?fit=640%2C430&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3539,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_databases\/spring-data-cassandra-simplifying-java-development-with-apache-cassandra\/","url_meta":{"origin":2391,"position":1},"title":"Spring Data Cassandra: Simplifying Java Development with Apache Cassandra","author":"Jeffery Miller","date":"April 20, 2026","format":false,"excerpt":"Apache Cassandra is a powerful NoSQL database known for its scalability and high availability. Spring Data Cassandra seamlessly integrates Spring\u2019s familiar programming model with Cassandra, boosting developer productivity. Why Spring Data Cassandra? Simplified Configuration: Spring Boot auto-configuration minimizes manual setup. Object-Relational Mapping (ORM): Easily map Java objects to Cassandra tables.\u2026","rel":"","context":"In &quot;Spring Databases&quot;","block_context":{"text":"Spring Databases","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_databases\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/network-3396348_1280.jpg?fit=1200%2C720&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/network-3396348_1280.jpg?fit=1200%2C720&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/network-3396348_1280.jpg?fit=1200%2C720&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/network-3396348_1280.jpg?fit=1200%2C720&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/network-3396348_1280.jpg?fit=1200%2C720&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3925,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_databases\/spring-data-jpa-java-records-the-ultimate-duo-for-clean-fast-query-projections\/","url_meta":{"origin":2391,"position":2},"title":"Spring Data JPA &#038; Java Records: The Ultimate Duo for Clean, Fast Query Projections","author":"Jeffery Miller","date":"April 20, 2026","format":false,"excerpt":"Architecting Efficient Data Access with Immutability As Spring developers, we spend a significant amount of time optimizing the path between the database and the client. One of the most common performance pitfalls is the over-fetching of data\u2014loading entire, complex JPA entities when all we need is a small subset of\u2026","rel":"","context":"In &quot;Spring Databases&quot;","block_context":{"text":"Spring Databases","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_databases\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/record-shop-9180482_1280.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/record-shop-9180482_1280.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/record-shop-9180482_1280.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/record-shop-9180482_1280.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/record-shop-9180482_1280.avif 3x"},"classes":[]},{"id":3213,"url":"https:\/\/www.mymiller.name\/wordpress\/java_tips\/java-tips-part-4\/","url_meta":{"origin":2391,"position":3},"title":"Java Tips Part 4","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"Continuing my Java Tips from experience that I have learned from code reviews to different programming tasks. Tip 16: Perform Bulk operations with Native Queries, or Stored Procedure It can be very tempting to do an update like the following: List<Person> people = ListUtils.safe(personRepository.findAll()).stream().filter person -> person.getAge() >= 60 ).map(person\u2026","rel":"","context":"In &quot;Java Tips&quot;","block_context":{"text":"Java Tips","link":"https:\/\/www.mymiller.name\/wordpress\/category\/java_tips\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2021\/12\/sam-dan-truong-rF4kuvgHhU-unsplash-scaled-e1640791434235.jpg?fit=640%2C427&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2021\/12\/sam-dan-truong-rF4kuvgHhU-unsplash-scaled-e1640791434235.jpg?fit=640%2C427&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2021\/12\/sam-dan-truong-rF4kuvgHhU-unsplash-scaled-e1640791434235.jpg?fit=640%2C427&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3148,"url":"https:\/\/www.mymiller.name\/wordpress\/java_tips\/java-tips-part-2\/","url_meta":{"origin":2391,"position":4},"title":"Java Tips Part 2","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"Continuing my Java Tips from experience that I have learned from code reviews to different programming tasks. Tip 6: Don't call .toString() on slf4j logging calls. So if you're following my other tips and using the formatting option of the logging messages like this: list.parallelStream().filter(item -> !item.contains(\"BOB\")).forEach(item -> logger.debug(\"Item: {}\u2026","rel":"","context":"In &quot;Java Tips&quot;","block_context":{"text":"Java Tips","link":"https:\/\/www.mymiller.name\/wordpress\/category\/java_tips\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2021\/12\/sam-dan-truong-rF4kuvgHhU-unsplash-scaled-e1640791434235.jpg?fit=640%2C427&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2021\/12\/sam-dan-truong-rF4kuvgHhU-unsplash-scaled-e1640791434235.jpg?fit=640%2C427&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2021\/12\/sam-dan-truong-rF4kuvgHhU-unsplash-scaled-e1640791434235.jpg?fit=640%2C427&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3179,"url":"https:\/\/www.mymiller.name\/wordpress\/java_extra\/understanding-json-data-processing-with-java-exploring-the-jsonfieldprocessor-class\/","url_meta":{"origin":2391,"position":5},"title":"Understanding JSON Data Processing with Java: Exploring the JsonFieldProcessor Class","author":"Jeffery Miller","date":"January 15, 2026","format":false,"excerpt":"In today's digital era, data comes in various formats, with JSON (JavaScript Object Notation) being one of the most popular for representing structured data. Manipulating and processing JSON data efficiently is crucial for many software applications, from web development to data analysis. In this article, we'll delve into the workings\u2026","rel":"","context":"In &quot;Java Extras&quot;","block_context":{"text":"Java Extras","link":"https:\/\/www.mymiller.name\/wordpress\/category\/java_extra\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/04\/data-7798787_640.png?fit=640%2C640&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/04\/data-7798787_640.png?fit=640%2C640&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/04\/data-7798787_640.png?fit=640%2C640&ssl=1&resize=525%2C300 1.5x"},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/2391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/comments?post=2391"}],"version-history":[{"count":17,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/2391\/revisions"}],"predecessor-version":[{"id":3279,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/2391\/revisions\/3279"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/media\/2429"}],"wp:attachment":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/media?parent=2391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/categories?post=2391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/tags?post=2391"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/series?post=2391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}